@bendyline/squisq 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Doc-BeSeH2iX.d.ts → Doc-BsMkmzH8.d.ts} +838 -268
- package/dist/{ImageEditDoc-BTIvw0oq.d.ts → ImageEditDoc-DvoeHMP9.d.ts} +11 -4
- package/dist/{chunk-ZTX4PFFT.js → chunk-2OIBZYKP.js} +75 -2
- package/dist/chunk-2OIBZYKP.js.map +1 -0
- package/dist/chunk-2UQOHYE2.js +45 -0
- package/dist/chunk-2UQOHYE2.js.map +1 -0
- package/dist/{chunk-B4EEON3N.js → chunk-4AKUQPEE.js} +536 -103
- package/dist/chunk-4AKUQPEE.js.map +1 -0
- package/dist/chunk-4ZFRZBU2.js +6582 -0
- package/dist/chunk-4ZFRZBU2.js.map +1 -0
- package/dist/{chunk-57CVQCFX.js → chunk-7MQGNR76.js} +79 -3
- package/dist/chunk-7MQGNR76.js.map +1 -0
- package/dist/{chunk-5WFRKURX.js → chunk-DLXZMS5K.js} +4 -2
- package/dist/chunk-DLXZMS5K.js.map +1 -0
- package/dist/{chunk-MYIH7FWD.js → chunk-FBKP5CAO.js} +1 -1
- package/dist/chunk-FBKP5CAO.js.map +1 -0
- package/dist/chunk-KZNXZ5SM.js +333 -0
- package/dist/chunk-KZNXZ5SM.js.map +1 -0
- package/dist/{chunk-WMOI7FN3.js → chunk-LRCV7N7F.js} +12 -2
- package/dist/{chunk-WMOI7FN3.js.map → chunk-LRCV7N7F.js.map} +1 -1
- package/dist/{chunk-3K5OG6KI.js → chunk-OH43RPTP.js} +403 -187
- package/dist/chunk-OH43RPTP.js.map +1 -0
- package/dist/{chunk-H3AXU4MJ.js → chunk-OKJOQXK4.js} +149 -2
- package/dist/chunk-OKJOQXK4.js.map +1 -0
- package/dist/chunk-PGGGKYWG.js +1 -0
- package/dist/chunk-PGGGKYWG.js.map +1 -0
- package/dist/{chunk-7UDSRZKG.js → chunk-Q3ROPT5H.js} +35 -14
- package/dist/chunk-Q3ROPT5H.js.map +1 -0
- package/dist/chunk-QE7TWGVT.js +178 -0
- package/dist/chunk-QE7TWGVT.js.map +1 -0
- package/dist/chunk-RUDYOTA6.js +345 -0
- package/dist/chunk-RUDYOTA6.js.map +1 -0
- package/dist/chunk-TVSGLUID.js +596 -0
- package/dist/chunk-TVSGLUID.js.map +1 -0
- package/dist/chunk-ZLQKNOZQ.js +1 -0
- package/dist/chunk-ZLQKNOZQ.js.map +1 -0
- package/dist/doc/index.d.ts +5 -10
- package/dist/doc/index.js +263 -7
- package/dist/doc/index.js.map +1 -1
- package/dist/generate/index.d.ts +106 -7
- package/dist/generate/index.js +16 -3
- package/dist/generate/index.js.map +1 -1
- package/dist/icons/index.d.ts +62 -10
- package/dist/icons/index.js +29 -9
- package/dist/icons/index.js.map +1 -1
- package/dist/icons/inlineIconMarker.d.ts +1 -0
- package/dist/icons/inlineIconMarker.js +15 -0
- package/dist/icons/inlineIconMarker.js.map +1 -0
- package/dist/imageEdit/index.d.ts +219 -11
- package/dist/imageEdit/index.js +56 -21
- package/dist/imageEdit/index.js.map +1 -1
- package/dist/index.d.ts +24 -13
- package/dist/index.js +680 -12
- package/dist/index.js.map +1 -1
- package/dist/inlineIconMarker-CiE8Hlvz.d.ts +59 -0
- package/dist/jsonForm/index.d.ts +189 -12
- package/dist/jsonForm/index.js +26 -11
- package/dist/jsonForm/index.js.map +1 -1
- package/dist/markdown/index.d.ts +474 -19
- package/dist/markdown/index.js +72 -33
- package/dist/markdown/index.js.map +1 -1
- package/dist/random/index.d.ts +51 -2
- package/dist/random/index.js +9 -1
- package/dist/random/index.js.map +1 -1
- package/dist/recommend/index.d.ts +39 -13
- package/dist/recommend/index.js +10 -14
- package/dist/recommend/index.js.map +1 -1
- package/dist/schemas/index.d.ts +208 -15
- package/dist/schemas/index.js +150 -11
- package/dist/schemas/index.js.map +1 -1
- package/dist/spatial/index.d.ts +116 -3
- package/dist/spatial/index.js +24 -2
- package/dist/spatial/index.js.map +1 -1
- package/dist/storage/index.d.ts +159 -10
- package/dist/storage/index.js +20 -6
- package/dist/storage/index.js.map +1 -1
- package/dist/story/index.d.ts +906 -40
- package/dist/story/index.js +124 -6
- package/dist/{themeLibrary-BHjJ0Qx6.d.ts → themeLibrary-DQQKuRMx.d.ts} +1 -1
- package/dist/timing/index.d.ts +109 -4
- package/dist/timing/index.js +23 -2
- package/dist/timing/index.js.map +1 -1
- package/dist/transform/index.d.ts +213 -6
- package/dist/transform/index.js +26 -3
- package/dist/transform/index.js.map +1 -1
- package/dist/{types-BdZkdJ3z.d.ts → types-DlAZ7MW4.d.ts} +115 -1
- package/dist/versions/index.d.ts +123 -24
- package/dist/versions/index.js +34 -27
- package/dist/versions/index.js.map +1 -1
- package/package.json +6 -1
- package/src/__tests__/animationUtils.test.ts +40 -0
- package/src/__tests__/annotationCoercion.test.ts +243 -0
- package/src/__tests__/applyRenderStyle.test.ts +146 -0
- package/src/__tests__/atmosphereLayers.test.ts +108 -0
- package/src/__tests__/attrTokens.test.ts +162 -0
- package/src/__tests__/customTemplateSample.test.ts +83 -0
- package/src/__tests__/customTemplatesFrontmatter.test.ts +205 -0
- package/src/__tests__/customThemesFrontmatter.test.ts +118 -0
- package/src/__tests__/diagramBlock.test.ts +122 -0
- package/src/__tests__/diagramLayout.test.ts +134 -0
- package/src/__tests__/drawing.test.ts +109 -0
- package/src/__tests__/drawingBlock.test.ts +124 -0
- package/src/__tests__/drawingLayout.test.ts +171 -0
- package/src/__tests__/geohash.test.ts +6 -5
- package/src/__tests__/getLayers.test.ts +6 -2
- package/src/__tests__/getLayersFallback.test.ts +103 -0
- package/src/__tests__/imageEditExportSvg.test.ts +70 -0
- package/src/__tests__/imageEditVersions.test.ts +72 -0
- package/src/__tests__/inlineIconMarker.test.ts +36 -0
- package/src/__tests__/layoutBlock.test.ts +83 -0
- package/src/__tests__/layoutLayout.test.ts +169 -0
- package/src/__tests__/markdown.test.ts +23 -0
- package/src/__tests__/markdownSanitize.test.ts +64 -0
- package/src/__tests__/markdownToDoc.test.ts +223 -2
- package/src/__tests__/mediaAnnotations.test.ts +64 -0
- package/src/__tests__/mediaSchedule.test.ts +118 -0
- package/src/__tests__/pandocAttrParse.test.ts +187 -0
- package/src/__tests__/resolveDocTheme.test.ts +55 -0
- package/src/__tests__/rootExports.test.ts +43 -0
- package/src/__tests__/shapeGeometry.test.ts +89 -0
- package/src/__tests__/shapeVocabulary.test.ts +133 -0
- package/src/__tests__/structuredData.test.ts +179 -0
- package/src/__tests__/templateAnnotationParse.test.ts +108 -0
- package/src/__tests__/templateMetadata.test.ts +21 -0
- package/src/__tests__/templates.test.ts +145 -4
- package/src/__tests__/themeCompile.test.ts +42 -0
- package/src/__tests__/themeValidator.test.ts +6 -0
- package/src/__tests__/transformV2.test.ts +137 -0
- package/src/__tests__/transitionNormalize.test.ts +61 -0
- package/src/__tests__/validateDoc.test.ts +100 -0
- package/src/doc/customTemplatesFrontmatter.ts +308 -0
- package/src/doc/customThemesFrontmatter.ts +90 -0
- package/src/doc/docToMarkdown.ts +73 -4
- package/src/doc/getLayers.ts +40 -17
- package/src/doc/index.ts +35 -1
- package/src/doc/markdownToDoc.ts +333 -12
- package/src/doc/mediaAnnotations.ts +118 -0
- package/src/doc/resolveDocTheme.ts +55 -0
- package/src/doc/structuredData.ts +230 -0
- package/src/doc/templateInputs.ts +240 -0
- package/src/doc/templates/__tests__/customTemplate.test.ts +151 -0
- package/src/doc/templates/__tests__/customTemplateRegistry.test.ts +110 -0
- package/src/doc/templates/accentImage.ts +30 -6
- package/src/doc/templates/captionUtils.ts +23 -0
- package/src/doc/templates/comparisonBar.ts +26 -18
- package/src/doc/templates/coverBlock.ts +7 -4
- package/src/doc/templates/customTemplate.ts +45 -0
- package/src/doc/templates/dataTable.ts +37 -19
- package/src/doc/templates/dateEvent.ts +41 -20
- package/src/doc/templates/definitionCard.ts +26 -18
- package/src/doc/templates/diagramBlock.ts +204 -0
- package/src/doc/templates/diagramLayout.ts +159 -0
- package/src/doc/templates/drawingBlock.ts +325 -0
- package/src/doc/templates/drawingLayout.ts +539 -0
- package/src/doc/templates/factCard.ts +51 -25
- package/src/doc/templates/fallbackBlock.ts +123 -0
- package/src/doc/templates/featureBlock.ts +20 -13
- package/src/doc/templates/fullBleedQuote.ts +18 -8
- package/src/doc/templates/imageWithCaption.ts +22 -9
- package/src/doc/templates/index.ts +215 -46
- package/src/doc/templates/layoutBlock.ts +43 -0
- package/src/doc/templates/layoutLayout.ts +243 -0
- package/src/doc/templates/listBlock.ts +56 -30
- package/src/doc/templates/mapBlock.ts +15 -12
- package/src/doc/templates/metadata.ts +120 -0
- package/src/doc/templates/persistentLayers.ts +129 -11
- package/src/doc/templates/photoGrid.ts +23 -12
- package/src/doc/templates/pullQuote.ts +30 -12
- package/src/doc/templates/quoteBlock.ts +54 -29
- package/src/doc/templates/sectionHeader.ts +25 -11
- package/src/doc/templates/statHighlight.ts +39 -22
- package/src/doc/templates/titleBlock.ts +59 -21
- package/src/doc/templates/tokens/__tests__/resolveTokens.test.ts +221 -0
- package/src/doc/templates/tokens/resolveTokens.ts +0 -0
- package/src/doc/templates/twoColumn.ts +48 -30
- package/src/doc/templates/videoPullQuote.ts +22 -12
- package/src/doc/templates/videoWithCaption.ts +13 -8
- package/src/doc/utils/animationUtils.ts +267 -3
- package/src/doc/utils/applyRenderStyle.ts +113 -0
- package/src/doc/utils/imageTreatment.ts +70 -0
- package/src/doc/utils/shapeGeometry.ts +464 -0
- package/src/doc/utils/themeUtils.ts +75 -1
- package/src/doc/validate.ts +476 -0
- package/src/generate/slideshowGenerator.ts +7 -0
- package/src/icons/index.ts +8 -0
- package/src/icons/inlineIconMarker.ts +73 -0
- package/src/imageEdit/export.ts +85 -2
- package/src/imageEdit/index.ts +1 -0
- package/src/imageEdit/persistence.ts +51 -0
- package/src/index.ts +2 -0
- package/src/markdown/annotationCoercion.ts +295 -0
- package/src/markdown/attrTokens.ts +222 -0
- package/src/markdown/convert.ts +229 -26
- package/src/markdown/index.ts +36 -0
- package/src/markdown/sanitize.ts +298 -0
- package/src/markdown/stringify.ts +84 -3
- package/src/markdown/types.ts +66 -0
- package/src/markdown/utils.ts +49 -1
- package/src/recommend/templates.ts +24 -0
- package/src/schemas/BlockTemplates.ts +133 -4
- package/src/schemas/CustomTemplates.ts +74 -0
- package/src/schemas/Doc.ts +353 -29
- package/src/schemas/ImageEditDoc.ts +11 -4
- package/src/schemas/Media.ts +169 -0
- package/src/schemas/Theme.ts +23 -1
- package/src/schemas/Transitions.ts +224 -0
- package/src/schemas/colorUtils.ts +33 -0
- package/src/schemas/fontStacks.ts +5 -2
- package/src/schemas/index.ts +3 -0
- package/src/schemas/themeCompile.ts +23 -4
- package/src/schemas/themeValidator.ts +49 -11
- package/src/schemas/themes/cinematic.json +69 -12
- package/src/schemas/themes/documentary.json +58 -11
- package/src/schemas/themes/gezellig.json +60 -11
- package/src/schemas/themes/magazine.json +54 -9
- package/src/schemas/themes/morning-light.json +52 -9
- package/src/schemas/themes/standard-dark.json +48 -13
- package/src/schemas/themes/standard.json +44 -12
- package/src/schemas/themes/tech-dark.json +65 -12
- package/src/spatial/Geohash.ts +52 -21
- package/src/transform/applyTransform.ts +43 -4
- package/src/transform/index.ts +1 -0
- package/src/transform/registry.ts +44 -13
- package/src/transform/styles/dataDriven.ts +2 -1
- package/src/transform/styles/documentary.ts +2 -1
- package/src/transform/styles/magazine.ts +3 -1
- package/src/transform/styles/minimal.ts +2 -1
- package/src/transform/styles/narrative.ts +3 -1
- package/src/transform/templateSelector.ts +87 -11
- package/src/transform/types.ts +35 -2
- package/dist/__tests__/animationUtils.test.d.ts +0 -2
- package/dist/__tests__/animationUtils.test.d.ts.map +0 -1
- package/dist/__tests__/animationUtils.test.js +0 -60
- package/dist/__tests__/animationUtils.test.js.map +0 -1
- package/dist/__tests__/colorUtils.test.d.ts +0 -2
- package/dist/__tests__/colorUtils.test.d.ts.map +0 -1
- package/dist/__tests__/colorUtils.test.js +0 -94
- package/dist/__tests__/colorUtils.test.js.map +0 -1
- package/dist/__tests__/contentContainer.test.d.ts +0 -2
- package/dist/__tests__/contentContainer.test.d.ts.map +0 -1
- package/dist/__tests__/contentContainer.test.js +0 -234
- package/dist/__tests__/contentContainer.test.js.map +0 -1
- package/dist/__tests__/contentExtractor.test.d.ts +0 -2
- package/dist/__tests__/contentExtractor.test.d.ts.map +0 -1
- package/dist/__tests__/contentExtractor.test.js +0 -151
- package/dist/__tests__/contentExtractor.test.js.map +0 -1
- package/dist/__tests__/coverBlock.test.d.ts +0 -2
- package/dist/__tests__/coverBlock.test.d.ts.map +0 -1
- package/dist/__tests__/coverBlock.test.js +0 -197
- package/dist/__tests__/coverBlock.test.js.map +0 -1
- package/dist/__tests__/dataTable.test.d.ts +0 -2
- package/dist/__tests__/dataTable.test.d.ts.map +0 -1
- package/dist/__tests__/dataTable.test.js +0 -110
- package/dist/__tests__/dataTable.test.js.map +0 -1
- package/dist/__tests__/geohash.test.d.ts +0 -2
- package/dist/__tests__/geohash.test.d.ts.map +0 -1
- package/dist/__tests__/geohash.test.js +0 -87
- package/dist/__tests__/geohash.test.js.map +0 -1
- package/dist/__tests__/getLayers.test.d.ts +0 -2
- package/dist/__tests__/getLayers.test.d.ts.map +0 -1
- package/dist/__tests__/getLayers.test.js +0 -191
- package/dist/__tests__/getLayers.test.js.map +0 -1
- package/dist/__tests__/haversine.test.d.ts +0 -2
- package/dist/__tests__/haversine.test.d.ts.map +0 -1
- package/dist/__tests__/haversine.test.js +0 -56
- package/dist/__tests__/haversine.test.js.map +0 -1
- package/dist/__tests__/iconResolve.test.d.ts +0 -2
- package/dist/__tests__/iconResolve.test.d.ts.map +0 -1
- package/dist/__tests__/iconResolve.test.js +0 -99
- package/dist/__tests__/iconResolve.test.js.map +0 -1
- package/dist/__tests__/imageEditState.test.d.ts +0 -2
- package/dist/__tests__/imageEditState.test.d.ts.map +0 -1
- package/dist/__tests__/imageEditState.test.js +0 -61
- package/dist/__tests__/imageEditState.test.js.map +0 -1
- package/dist/__tests__/imageEditVersions.test.d.ts +0 -2
- package/dist/__tests__/imageEditVersions.test.d.ts.map +0 -1
- package/dist/__tests__/imageEditVersions.test.js +0 -141
- package/dist/__tests__/imageEditVersions.test.js.map +0 -1
- package/dist/__tests__/inferDocumentTitle.test.d.ts +0 -2
- package/dist/__tests__/inferDocumentTitle.test.d.ts.map +0 -1
- package/dist/__tests__/inferDocumentTitle.test.js +0 -42
- package/dist/__tests__/inferDocumentTitle.test.js.map +0 -1
- package/dist/__tests__/jsonForm.chooseControl.test.d.ts +0 -2
- package/dist/__tests__/jsonForm.chooseControl.test.d.ts.map +0 -1
- package/dist/__tests__/jsonForm.chooseControl.test.js +0 -74
- package/dist/__tests__/jsonForm.chooseControl.test.js.map +0 -1
- package/dist/__tests__/jsonForm.evaluateWhen.test.d.ts +0 -2
- package/dist/__tests__/jsonForm.evaluateWhen.test.d.ts.map +0 -1
- package/dist/__tests__/jsonForm.evaluateWhen.test.js +0 -51
- package/dist/__tests__/jsonForm.evaluateWhen.test.js.map +0 -1
- package/dist/__tests__/jsonForm.inferSchema.test.d.ts +0 -2
- package/dist/__tests__/jsonForm.inferSchema.test.d.ts.map +0 -1
- package/dist/__tests__/jsonForm.inferSchema.test.js +0 -23
- package/dist/__tests__/jsonForm.inferSchema.test.js.map +0 -1
- package/dist/__tests__/jsonForm.pointer.test.d.ts +0 -2
- package/dist/__tests__/jsonForm.pointer.test.d.ts.map +0 -1
- package/dist/__tests__/jsonForm.pointer.test.js +0 -94
- package/dist/__tests__/jsonForm.pointer.test.js.map +0 -1
- package/dist/__tests__/localForageAdapter.test.d.ts +0 -8
- package/dist/__tests__/localForageAdapter.test.d.ts.map +0 -1
- package/dist/__tests__/localForageAdapter.test.js +0 -130
- package/dist/__tests__/localForageAdapter.test.js.map +0 -1
- package/dist/__tests__/markdown.test.d.ts +0 -2
- package/dist/__tests__/markdown.test.d.ts.map +0 -1
- package/dist/__tests__/markdown.test.js +0 -715
- package/dist/__tests__/markdown.test.js.map +0 -1
- package/dist/__tests__/markdownIcons.test.d.ts +0 -2
- package/dist/__tests__/markdownIcons.test.d.ts.map +0 -1
- package/dist/__tests__/markdownIcons.test.js +0 -93
- package/dist/__tests__/markdownIcons.test.js.map +0 -1
- package/dist/__tests__/markdownToDoc.test.d.ts +0 -2
- package/dist/__tests__/markdownToDoc.test.d.ts.map +0 -1
- package/dist/__tests__/markdownToDoc.test.js +0 -458
- package/dist/__tests__/markdownToDoc.test.js.map +0 -1
- package/dist/__tests__/recommendTemplates.test.d.ts +0 -2
- package/dist/__tests__/recommendTemplates.test.d.ts.map +0 -1
- package/dist/__tests__/recommendTemplates.test.js +0 -158
- package/dist/__tests__/recommendTemplates.test.js.map +0 -1
- package/dist/__tests__/scopedContentContainer.test.d.ts +0 -2
- package/dist/__tests__/scopedContentContainer.test.d.ts.map +0 -1
- package/dist/__tests__/scopedContentContainer.test.js +0 -74
- package/dist/__tests__/scopedContentContainer.test.js.map +0 -1
- package/dist/__tests__/seededRandom.test.d.ts +0 -2
- package/dist/__tests__/seededRandom.test.d.ts.map +0 -1
- package/dist/__tests__/seededRandom.test.js +0 -125
- package/dist/__tests__/seededRandom.test.js.map +0 -1
- package/dist/__tests__/slideshowGenerator.test.d.ts +0 -2
- package/dist/__tests__/slideshowGenerator.test.d.ts.map +0 -1
- package/dist/__tests__/slideshowGenerator.test.js +0 -114
- package/dist/__tests__/slideshowGenerator.test.js.map +0 -1
- package/dist/__tests__/storage.test.d.ts +0 -2
- package/dist/__tests__/storage.test.d.ts.map +0 -1
- package/dist/__tests__/storage.test.js +0 -51
- package/dist/__tests__/storage.test.js.map +0 -1
- package/dist/__tests__/surface.test.d.ts +0 -2
- package/dist/__tests__/surface.test.d.ts.map +0 -1
- package/dist/__tests__/surface.test.js +0 -57
- package/dist/__tests__/surface.test.js.map +0 -1
- package/dist/__tests__/templateAnnotationParse.test.d.ts +0 -2
- package/dist/__tests__/templateAnnotationParse.test.d.ts.map +0 -1
- package/dist/__tests__/templateAnnotationParse.test.js +0 -42
- package/dist/__tests__/templateAnnotationParse.test.js.map +0 -1
- package/dist/__tests__/templates.test.d.ts +0 -2
- package/dist/__tests__/templates.test.d.ts.map +0 -1
- package/dist/__tests__/templates.test.js +0 -298
- package/dist/__tests__/templates.test.js.map +0 -1
- package/dist/__tests__/themeCompile.test.d.ts +0 -2
- package/dist/__tests__/themeCompile.test.d.ts.map +0 -1
- package/dist/__tests__/themeCompile.test.js +0 -134
- package/dist/__tests__/themeCompile.test.js.map +0 -1
- package/dist/__tests__/themeValidator.test.d.ts +0 -2
- package/dist/__tests__/themeValidator.test.d.ts.map +0 -1
- package/dist/__tests__/themeValidator.test.js +0 -107
- package/dist/__tests__/themeValidator.test.js.map +0 -1
- package/dist/__tests__/timing.test.d.ts +0 -2
- package/dist/__tests__/timing.test.d.ts.map +0 -1
- package/dist/__tests__/timing.test.js +0 -131
- package/dist/__tests__/timing.test.js.map +0 -1
- package/dist/__tests__/versions.test.d.ts +0 -2
- package/dist/__tests__/versions.test.d.ts.map +0 -1
- package/dist/__tests__/versions.test.js +0 -339
- package/dist/__tests__/versions.test.js.map +0 -1
- package/dist/chunk-3K5OG6KI.js.map +0 -1
- package/dist/chunk-57CVQCFX.js.map +0 -1
- package/dist/chunk-5WFRKURX.js.map +0 -1
- package/dist/chunk-7UDSRZKG.js.map +0 -1
- package/dist/chunk-B4EEON3N.js.map +0 -1
- package/dist/chunk-H3AXU4MJ.js.map +0 -1
- package/dist/chunk-KSWJR66U.js +0 -3706
- package/dist/chunk-KSWJR66U.js.map +0 -1
- package/dist/chunk-MYIH7FWD.js.map +0 -1
- package/dist/chunk-ZTX4PFFT.js.map +0 -1
- package/dist/doc/audioMapping.d.ts +0 -36
- package/dist/doc/audioMapping.d.ts.map +0 -1
- package/dist/doc/audioMapping.js +0 -350
- package/dist/doc/audioMapping.js.map +0 -1
- package/dist/doc/docToMarkdown.d.ts +0 -41
- package/dist/doc/docToMarkdown.d.ts.map +0 -1
- package/dist/doc/docToMarkdown.js +0 -88
- package/dist/doc/docToMarkdown.js.map +0 -1
- package/dist/doc/getLayers.d.ts +0 -65
- package/dist/doc/getLayers.d.ts.map +0 -1
- package/dist/doc/getLayers.js +0 -114
- package/dist/doc/getLayers.js.map +0 -1
- package/dist/doc/index.d.ts.map +0 -1
- package/dist/doc/markdownToDoc.d.ts +0 -75
- package/dist/doc/markdownToDoc.d.ts.map +0 -1
- package/dist/doc/markdownToDoc.js +0 -432
- package/dist/doc/markdownToDoc.js.map +0 -1
- package/dist/doc/templates/accentImage.d.ts +0 -59
- package/dist/doc/templates/accentImage.d.ts.map +0 -1
- package/dist/doc/templates/accentImage.js +0 -275
- package/dist/doc/templates/accentImage.js.map +0 -1
- package/dist/doc/templates/captionUtils.d.ts +0 -20
- package/dist/doc/templates/captionUtils.d.ts.map +0 -1
- package/dist/doc/templates/captionUtils.js +0 -29
- package/dist/doc/templates/captionUtils.js.map +0 -1
- package/dist/doc/templates/comparisonBar.d.ts +0 -13
- package/dist/doc/templates/comparisonBar.d.ts.map +0 -1
- package/dist/doc/templates/comparisonBar.js +0 -145
- package/dist/doc/templates/comparisonBar.js.map +0 -1
- package/dist/doc/templates/coverBlock.d.ts +0 -51
- package/dist/doc/templates/coverBlock.d.ts.map +0 -1
- package/dist/doc/templates/coverBlock.js +0 -153
- package/dist/doc/templates/coverBlock.js.map +0 -1
- package/dist/doc/templates/dataTable.d.ts +0 -14
- package/dist/doc/templates/dataTable.d.ts.map +0 -1
- package/dist/doc/templates/dataTable.js +0 -73
- package/dist/doc/templates/dataTable.js.map +0 -1
- package/dist/doc/templates/dateEvent.d.ts +0 -15
- package/dist/doc/templates/dateEvent.d.ts.map +0 -1
- package/dist/doc/templates/dateEvent.js +0 -114
- package/dist/doc/templates/dateEvent.js.map +0 -1
- package/dist/doc/templates/definitionCard.d.ts +0 -13
- package/dist/doc/templates/definitionCard.d.ts.map +0 -1
- package/dist/doc/templates/definitionCard.js +0 -117
- package/dist/doc/templates/definitionCard.js.map +0 -1
- package/dist/doc/templates/factCard.d.ts +0 -15
- package/dist/doc/templates/factCard.d.ts.map +0 -1
- package/dist/doc/templates/factCard.js +0 -104
- package/dist/doc/templates/factCard.js.map +0 -1
- package/dist/doc/templates/featureBlock.d.ts +0 -18
- package/dist/doc/templates/featureBlock.d.ts.map +0 -1
- package/dist/doc/templates/featureBlock.js +0 -180
- package/dist/doc/templates/featureBlock.js.map +0 -1
- package/dist/doc/templates/fullBleedQuote.d.ts +0 -25
- package/dist/doc/templates/fullBleedQuote.d.ts.map +0 -1
- package/dist/doc/templates/fullBleedQuote.js +0 -67
- package/dist/doc/templates/fullBleedQuote.js.map +0 -1
- package/dist/doc/templates/imageWithCaption.d.ts +0 -13
- package/dist/doc/templates/imageWithCaption.d.ts.map +0 -1
- package/dist/doc/templates/imageWithCaption.js +0 -146
- package/dist/doc/templates/imageWithCaption.js.map +0 -1
- package/dist/doc/templates/index.d.ts +0 -129
- package/dist/doc/templates/index.d.ts.map +0 -1
- package/dist/doc/templates/index.js +0 -478
- package/dist/doc/templates/index.js.map +0 -1
- package/dist/doc/templates/listBlock.d.ts +0 -13
- package/dist/doc/templates/listBlock.d.ts.map +0 -1
- package/dist/doc/templates/listBlock.js +0 -109
- package/dist/doc/templates/listBlock.js.map +0 -1
- package/dist/doc/templates/mapBlock.d.ts +0 -17
- package/dist/doc/templates/mapBlock.d.ts.map +0 -1
- package/dist/doc/templates/mapBlock.js +0 -115
- package/dist/doc/templates/mapBlock.js.map +0 -1
- package/dist/doc/templates/persistentLayers.d.ts +0 -39
- package/dist/doc/templates/persistentLayers.d.ts.map +0 -1
- package/dist/doc/templates/persistentLayers.js +0 -447
- package/dist/doc/templates/persistentLayers.js.map +0 -1
- package/dist/doc/templates/photoGrid.d.ts +0 -20
- package/dist/doc/templates/photoGrid.d.ts.map +0 -1
- package/dist/doc/templates/photoGrid.js +0 -175
- package/dist/doc/templates/photoGrid.js.map +0 -1
- package/dist/doc/templates/pullQuote.d.ts +0 -13
- package/dist/doc/templates/pullQuote.d.ts.map +0 -1
- package/dist/doc/templates/pullQuote.js +0 -113
- package/dist/doc/templates/pullQuote.js.map +0 -1
- package/dist/doc/templates/quoteBlock.d.ts +0 -15
- package/dist/doc/templates/quoteBlock.d.ts.map +0 -1
- package/dist/doc/templates/quoteBlock.js +0 -101
- package/dist/doc/templates/quoteBlock.js.map +0 -1
- package/dist/doc/templates/sectionHeader.d.ts +0 -14
- package/dist/doc/templates/sectionHeader.d.ts.map +0 -1
- package/dist/doc/templates/sectionHeader.js +0 -97
- package/dist/doc/templates/sectionHeader.js.map +0 -1
- package/dist/doc/templates/statHighlight.d.ts +0 -27
- package/dist/doc/templates/statHighlight.d.ts.map +0 -1
- package/dist/doc/templates/statHighlight.js +0 -114
- package/dist/doc/templates/statHighlight.js.map +0 -1
- package/dist/doc/templates/titleBlock.d.ts +0 -24
- package/dist/doc/templates/titleBlock.d.ts.map +0 -1
- package/dist/doc/templates/titleBlock.js +0 -103
- package/dist/doc/templates/titleBlock.js.map +0 -1
- package/dist/doc/templates/twoColumn.d.ts +0 -15
- package/dist/doc/templates/twoColumn.d.ts.map +0 -1
- package/dist/doc/templates/twoColumn.js +0 -225
- package/dist/doc/templates/twoColumn.js.map +0 -1
- package/dist/doc/templates/videoPullQuote.d.ts +0 -20
- package/dist/doc/templates/videoPullQuote.d.ts.map +0 -1
- package/dist/doc/templates/videoPullQuote.js +0 -122
- package/dist/doc/templates/videoPullQuote.js.map +0 -1
- package/dist/doc/templates/videoWithCaption.d.ts +0 -20
- package/dist/doc/templates/videoWithCaption.d.ts.map +0 -1
- package/dist/doc/templates/videoWithCaption.js +0 -107
- package/dist/doc/templates/videoWithCaption.js.map +0 -1
- package/dist/doc/utils/animationUtils.d.ts +0 -34
- package/dist/doc/utils/animationUtils.d.ts.map +0 -1
- package/dist/doc/utils/animationUtils.js +0 -110
- package/dist/doc/utils/animationUtils.js.map +0 -1
- package/dist/doc/utils/themeUtils.d.ts +0 -64
- package/dist/doc/utils/themeUtils.d.ts.map +0 -1
- package/dist/doc/utils/themeUtils.js +0 -136
- package/dist/doc/utils/themeUtils.js.map +0 -1
- package/dist/generate/contentExtractor.d.ts +0 -112
- package/dist/generate/contentExtractor.d.ts.map +0 -1
- package/dist/generate/contentExtractor.js +0 -638
- package/dist/generate/contentExtractor.js.map +0 -1
- package/dist/generate/index.d.ts.map +0 -1
- package/dist/generate/slideshowGenerator.d.ts +0 -72
- package/dist/generate/slideshowGenerator.d.ts.map +0 -1
- package/dist/generate/slideshowGenerator.js +0 -159
- package/dist/generate/slideshowGenerator.js.map +0 -1
- package/dist/generate/templateMapper.d.ts +0 -23
- package/dist/generate/templateMapper.d.ts.map +0 -1
- package/dist/generate/templateMapper.js +0 -114
- package/dist/generate/templateMapper.js.map +0 -1
- package/dist/icons/iconData.d.ts +0 -26
- package/dist/icons/iconData.d.ts.map +0 -1
- package/dist/icons/iconData.js +0 -12
- package/dist/icons/iconData.js.map +0 -1
- package/dist/icons/index.d.ts.map +0 -1
- package/dist/icons/resolve.d.ts +0 -61
- package/dist/icons/resolve.d.ts.map +0 -1
- package/dist/icons/resolve.js +0 -130
- package/dist/icons/resolve.js.map +0 -1
- package/dist/imageEdit/ImageEditVersionManager.d.ts +0 -31
- package/dist/imageEdit/ImageEditVersionManager.d.ts.map +0 -1
- package/dist/imageEdit/ImageEditVersionManager.js +0 -39
- package/dist/imageEdit/ImageEditVersionManager.js.map +0 -1
- package/dist/imageEdit/export.d.ts +0 -33
- package/dist/imageEdit/export.d.ts.map +0 -1
- package/dist/imageEdit/export.js +0 -253
- package/dist/imageEdit/export.js.map +0 -1
- package/dist/imageEdit/index.d.ts.map +0 -1
- package/dist/imageEdit/persistence.d.ts +0 -15
- package/dist/imageEdit/persistence.d.ts.map +0 -1
- package/dist/imageEdit/persistence.js +0 -49
- package/dist/imageEdit/persistence.js.map +0 -1
- package/dist/imageEdit/state.d.ts +0 -42
- package/dist/imageEdit/state.d.ts.map +0 -1
- package/dist/imageEdit/state.js +0 -98
- package/dist/imageEdit/state.js.map +0 -1
- package/dist/imageEdit/versionPaths.d.ts +0 -27
- package/dist/imageEdit/versionPaths.d.ts.map +0 -1
- package/dist/imageEdit/versionPaths.js +0 -57
- package/dist/imageEdit/versionPaths.js.map +0 -1
- package/dist/imageEdit/versions.d.ts +0 -67
- package/dist/imageEdit/versions.d.ts.map +0 -1
- package/dist/imageEdit/versions.js +0 -161
- package/dist/imageEdit/versions.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/jsonForm/chooseControl.d.ts +0 -20
- package/dist/jsonForm/chooseControl.d.ts.map +0 -1
- package/dist/jsonForm/chooseControl.js +0 -82
- package/dist/jsonForm/chooseControl.js.map +0 -1
- package/dist/jsonForm/evaluateWhen.d.ts +0 -12
- package/dist/jsonForm/evaluateWhen.d.ts.map +0 -1
- package/dist/jsonForm/evaluateWhen.js +0 -65
- package/dist/jsonForm/evaluateWhen.js.map +0 -1
- package/dist/jsonForm/index.d.ts.map +0 -1
- package/dist/jsonForm/inferSchema.d.ts +0 -12
- package/dist/jsonForm/inferSchema.d.ts.map +0 -1
- package/dist/jsonForm/inferSchema.js +0 -15
- package/dist/jsonForm/inferSchema.js.map +0 -1
- package/dist/jsonForm/pointer.d.ts +0 -26
- package/dist/jsonForm/pointer.d.ts.map +0 -1
- package/dist/jsonForm/pointer.js +0 -102
- package/dist/jsonForm/pointer.js.map +0 -1
- package/dist/jsonForm/types.d.ts +0 -120
- package/dist/jsonForm/types.d.ts.map +0 -1
- package/dist/jsonForm/types.js +0 -10
- package/dist/jsonForm/types.js.map +0 -1
- package/dist/markdown/convert.d.ts +0 -81
- package/dist/markdown/convert.d.ts.map +0 -1
- package/dist/markdown/convert.js +0 -975
- package/dist/markdown/convert.js.map +0 -1
- package/dist/markdown/htmlParse.d.ts +0 -26
- package/dist/markdown/htmlParse.d.ts.map +0 -1
- package/dist/markdown/htmlParse.js +0 -195
- package/dist/markdown/htmlParse.js.map +0 -1
- package/dist/markdown/index.d.ts.map +0 -1
- package/dist/markdown/parse.d.ts +0 -27
- package/dist/markdown/parse.d.ts.map +0 -1
- package/dist/markdown/parse.js +0 -90
- package/dist/markdown/parse.js.map +0 -1
- package/dist/markdown/stringify.d.ts +0 -32
- package/dist/markdown/stringify.d.ts.map +0 -1
- package/dist/markdown/stringify.js +0 -108
- package/dist/markdown/stringify.js.map +0 -1
- package/dist/markdown/types.d.ts +0 -531
- package/dist/markdown/types.d.ts.map +0 -1
- package/dist/markdown/types.js +0 -17
- package/dist/markdown/types.js.map +0 -1
- package/dist/markdown/utils.d.ts +0 -118
- package/dist/markdown/utils.d.ts.map +0 -1
- package/dist/markdown/utils.js +0 -308
- package/dist/markdown/utils.js.map +0 -1
- package/dist/random/SeededRandom.d.ts +0 -50
- package/dist/random/SeededRandom.d.ts.map +0 -1
- package/dist/random/SeededRandom.js +0 -115
- package/dist/random/SeededRandom.js.map +0 -1
- package/dist/random/index.d.ts.map +0 -1
- package/dist/recommend/index.d.ts.map +0 -1
- package/dist/recommend/templates.d.ts +0 -39
- package/dist/recommend/templates.d.ts.map +0 -1
- package/dist/recommend/templates.js +0 -235
- package/dist/recommend/templates.js.map +0 -1
- package/dist/schemas/BlockTemplates.d.ts +0 -638
- package/dist/schemas/BlockTemplates.d.ts.map +0 -1
- package/dist/schemas/BlockTemplates.js +0 -72
- package/dist/schemas/BlockTemplates.js.map +0 -1
- package/dist/schemas/Doc.d.ts +0 -503
- package/dist/schemas/Doc.d.ts.map +0 -1
- package/dist/schemas/Doc.js +0 -90
- package/dist/schemas/Doc.js.map +0 -1
- package/dist/schemas/ImageEditDoc.d.ts +0 -81
- package/dist/schemas/ImageEditDoc.d.ts.map +0 -1
- package/dist/schemas/ImageEditDoc.js +0 -20
- package/dist/schemas/ImageEditDoc.js.map +0 -1
- package/dist/schemas/LayoutStrategy.d.ts +0 -84
- package/dist/schemas/LayoutStrategy.d.ts.map +0 -1
- package/dist/schemas/LayoutStrategy.js +0 -123
- package/dist/schemas/LayoutStrategy.js.map +0 -1
- package/dist/schemas/MediaProvider.d.ts +0 -65
- package/dist/schemas/MediaProvider.d.ts.map +0 -1
- package/dist/schemas/MediaProvider.js +0 -13
- package/dist/schemas/MediaProvider.js.map +0 -1
- package/dist/schemas/Theme.d.ts +0 -233
- package/dist/schemas/Theme.d.ts.map +0 -1
- package/dist/schemas/Theme.js +0 -129
- package/dist/schemas/Theme.js.map +0 -1
- package/dist/schemas/Types.d.ts +0 -14
- package/dist/schemas/Types.d.ts.map +0 -1
- package/dist/schemas/Types.js +0 -5
- package/dist/schemas/Types.js.map +0 -1
- package/dist/schemas/Viewport.d.ts +0 -74
- package/dist/schemas/Viewport.d.ts.map +0 -1
- package/dist/schemas/Viewport.js +0 -63
- package/dist/schemas/Viewport.js.map +0 -1
- package/dist/schemas/colorUtils.d.ts +0 -51
- package/dist/schemas/colorUtils.d.ts.map +0 -1
- package/dist/schemas/colorUtils.js +0 -154
- package/dist/schemas/colorUtils.js.map +0 -1
- package/dist/schemas/fontStacks.d.ts +0 -57
- package/dist/schemas/fontStacks.d.ts.map +0 -1
- package/dist/schemas/fontStacks.js +0 -227
- package/dist/schemas/fontStacks.js.map +0 -1
- package/dist/schemas/index.d.ts.map +0 -1
- package/dist/schemas/themeCompile.d.ts +0 -45
- package/dist/schemas/themeCompile.d.ts.map +0 -1
- package/dist/schemas/themeCompile.js +0 -160
- package/dist/schemas/themeCompile.js.map +0 -1
- package/dist/schemas/themeLibrary.d.ts +0 -37
- package/dist/schemas/themeLibrary.d.ts.map +0 -1
- package/dist/schemas/themeLibrary.js +0 -49
- package/dist/schemas/themeLibrary.js.map +0 -1
- package/dist/schemas/themeValidator.d.ts +0 -26
- package/dist/schemas/themeValidator.d.ts.map +0 -1
- package/dist/schemas/themeValidator.js +0 -352
- package/dist/schemas/themeValidator.js.map +0 -1
- package/dist/schemas/themes/bold.json +0 -48
- package/dist/schemas/themes/cinematic.json +0 -54
- package/dist/schemas/themes/documentary.json +0 -49
- package/dist/schemas/themes/gezellig.json +0 -44
- package/dist/schemas/themes/index.d.ts +0 -26
- package/dist/schemas/themes/index.d.ts.map +0 -1
- package/dist/schemas/themes/index.js +0 -49
- package/dist/schemas/themes/index.js.map +0 -1
- package/dist/schemas/themes/magazine.json +0 -44
- package/dist/schemas/themes/minimalist.json +0 -45
- package/dist/schemas/themes/morning-light.json +0 -42
- package/dist/schemas/themes/standard-dark.json +0 -50
- package/dist/schemas/themes/standard.json +0 -42
- package/dist/schemas/themes/tech-dark.json +0 -48
- package/dist/schemas/themes/warm-earth.json +0 -50
- package/dist/spatial/Geohash.d.ts +0 -85
- package/dist/spatial/Geohash.d.ts.map +0 -1
- package/dist/spatial/Geohash.js +0 -142
- package/dist/spatial/Geohash.js.map +0 -1
- package/dist/spatial/Haversine.d.ts +0 -24
- package/dist/spatial/Haversine.d.ts.map +0 -1
- package/dist/spatial/Haversine.js +0 -48
- package/dist/spatial/Haversine.js.map +0 -1
- package/dist/spatial/index.d.ts.map +0 -1
- package/dist/storage/ContentContainer.d.ts +0 -87
- package/dist/storage/ContentContainer.d.ts.map +0 -1
- package/dist/storage/ContentContainer.js +0 -131
- package/dist/storage/ContentContainer.js.map +0 -1
- package/dist/storage/LocalForageAdapter.d.ts +0 -36
- package/dist/storage/LocalForageAdapter.d.ts.map +0 -1
- package/dist/storage/LocalForageAdapter.js +0 -82
- package/dist/storage/LocalForageAdapter.js.map +0 -1
- package/dist/storage/LocalStorageAdapter.d.ts +0 -16
- package/dist/storage/LocalStorageAdapter.d.ts.map +0 -1
- package/dist/storage/LocalStorageAdapter.js +0 -50
- package/dist/storage/LocalStorageAdapter.js.map +0 -1
- package/dist/storage/MediaProviderFromContainer.d.ts +0 -21
- package/dist/storage/MediaProviderFromContainer.d.ts.map +0 -1
- package/dist/storage/MediaProviderFromContainer.js +0 -79
- package/dist/storage/MediaProviderFromContainer.js.map +0 -1
- package/dist/storage/MemoryStorageAdapter.d.ts +0 -15
- package/dist/storage/MemoryStorageAdapter.d.ts.map +0 -1
- package/dist/storage/MemoryStorageAdapter.js +0 -34
- package/dist/storage/MemoryStorageAdapter.js.map +0 -1
- package/dist/storage/ScopedContentContainer.d.ts +0 -44
- package/dist/storage/ScopedContentContainer.d.ts.map +0 -1
- package/dist/storage/ScopedContentContainer.js +0 -94
- package/dist/storage/ScopedContentContainer.js.map +0 -1
- package/dist/storage/Storage.d.ts +0 -23
- package/dist/storage/Storage.d.ts.map +0 -1
- package/dist/storage/Storage.js +0 -9
- package/dist/storage/Storage.js.map +0 -1
- package/dist/storage/index.d.ts.map +0 -1
- package/dist/timing/index.d.ts.map +0 -1
- package/dist/timing/narrationTiming.d.ts +0 -54
- package/dist/timing/narrationTiming.d.ts.map +0 -1
- package/dist/timing/narrationTiming.js +0 -190
- package/dist/timing/narrationTiming.js.map +0 -1
- package/dist/timing/readingTime.d.ts +0 -54
- package/dist/timing/readingTime.d.ts.map +0 -1
- package/dist/timing/readingTime.js +0 -49
- package/dist/timing/readingTime.js.map +0 -1
- package/dist/transform/applyTransform.d.ts +0 -22
- package/dist/transform/applyTransform.d.ts.map +0 -1
- package/dist/transform/applyTransform.js +0 -68
- package/dist/transform/applyTransform.js.map +0 -1
- package/dist/transform/blockAnalyzer.d.ts +0 -48
- package/dist/transform/blockAnalyzer.d.ts.map +0 -1
- package/dist/transform/blockAnalyzer.js +0 -135
- package/dist/transform/blockAnalyzer.js.map +0 -1
- package/dist/transform/index.d.ts.map +0 -1
- package/dist/transform/registry.d.ts +0 -19
- package/dist/transform/registry.d.ts.map +0 -1
- package/dist/transform/registry.js +0 -41
- package/dist/transform/registry.js.map +0 -1
- package/dist/transform/styles/dataDriven.d.ts +0 -4
- package/dist/transform/styles/dataDriven.d.ts.map +0 -1
- package/dist/transform/styles/dataDriven.js +0 -15
- package/dist/transform/styles/dataDriven.js.map +0 -1
- package/dist/transform/styles/documentary.d.ts +0 -4
- package/dist/transform/styles/documentary.d.ts.map +0 -1
- package/dist/transform/styles/documentary.js +0 -15
- package/dist/transform/styles/documentary.js.map +0 -1
- package/dist/transform/styles/index.d.ts +0 -6
- package/dist/transform/styles/index.d.ts.map +0 -1
- package/dist/transform/styles/index.js +0 -6
- package/dist/transform/styles/index.js.map +0 -1
- package/dist/transform/styles/magazine.d.ts +0 -4
- package/dist/transform/styles/magazine.d.ts.map +0 -1
- package/dist/transform/styles/magazine.js +0 -15
- package/dist/transform/styles/magazine.js.map +0 -1
- package/dist/transform/styles/minimal.d.ts +0 -4
- package/dist/transform/styles/minimal.d.ts.map +0 -1
- package/dist/transform/styles/minimal.js +0 -15
- package/dist/transform/styles/minimal.js.map +0 -1
- package/dist/transform/styles/narrative.d.ts +0 -4
- package/dist/transform/styles/narrative.d.ts.map +0 -1
- package/dist/transform/styles/narrative.js +0 -15
- package/dist/transform/styles/narrative.js.map +0 -1
- package/dist/transform/templateSelector.d.ts +0 -30
- package/dist/transform/templateSelector.d.ts.map +0 -1
- package/dist/transform/templateSelector.js +0 -218
- package/dist/transform/templateSelector.js.map +0 -1
- package/dist/transform/timingAllocator.d.ts +0 -21
- package/dist/transform/timingAllocator.d.ts.map +0 -1
- package/dist/transform/timingAllocator.js +0 -111
- package/dist/transform/timingAllocator.js.map +0 -1
- package/dist/transform/types.d.ts +0 -86
- package/dist/transform/types.d.ts.map +0 -1
- package/dist/transform/types.js +0 -9
- package/dist/transform/types.js.map +0 -1
- package/dist/versions/DocumentVersionManager.d.ts +0 -31
- package/dist/versions/DocumentVersionManager.d.ts.map +0 -1
- package/dist/versions/DocumentVersionManager.js +0 -33
- package/dist/versions/DocumentVersionManager.js.map +0 -1
- package/dist/versions/index.d.ts.map +0 -1
- package/dist/versions/operations.d.ts +0 -44
- package/dist/versions/operations.d.ts.map +0 -1
- package/dist/versions/operations.js +0 -190
- package/dist/versions/operations.js.map +0 -1
- package/dist/versions/paths.d.ts +0 -29
- package/dist/versions/paths.d.ts.map +0 -1
- package/dist/versions/paths.js +0 -66
- package/dist/versions/paths.js.map +0 -1
- package/dist/versions/timestamp.d.ts +0 -22
- package/dist/versions/timestamp.d.ts.map +0 -1
- package/dist/versions/timestamp.js +0 -44
- package/dist/versions/timestamp.js.map +0 -1
- package/dist/versions/types.d.ts +0 -92
- package/dist/versions/types.d.ts.map +0 -1
- package/dist/versions/types.js +0 -11
- package/dist/versions/types.js.map +0 -1
|
@@ -1,4 +1,89 @@
|
|
|
1
|
-
import { M as MarkdownBlockNode,
|
|
1
|
+
import { Z as Transition, $ as TransitionType, M as MarkdownBlockNode, q as MarkdownHeading } from './types-DlAZ7MW4.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Media-clip timing model.
|
|
5
|
+
*
|
|
6
|
+
* An additive layer on top of the legacy sequential `Doc.audio.segments[]`
|
|
7
|
+
* narration track. A {@link MediaClip} is a piece of audio or video whose
|
|
8
|
+
* timing is expressed *relative to its parent block* (or the whole document),
|
|
9
|
+
* with an optional `startAt` offset and an optional `spillover` past the
|
|
10
|
+
* block's end. {@link resolveMediaSchedule} flattens these into absolute,
|
|
11
|
+
* doc-timeline `ScheduledClip`s that playback and export consume.
|
|
12
|
+
*
|
|
13
|
+
* Authoring: a body-level `{[audio …]}` / `{[video …]}` annotation inside a
|
|
14
|
+
* block becomes a `block.media` clip; the same annotation in the preamble
|
|
15
|
+
* (before the first heading) with `anchor=document` becomes a
|
|
16
|
+
* `doc.documentMedia` clip that spans the whole timeline.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A timed piece of media attached to a block (or the document).
|
|
21
|
+
*/
|
|
22
|
+
interface MediaClip {
|
|
23
|
+
/** Stable id (for React keys and timeline selection). */
|
|
24
|
+
id: string;
|
|
25
|
+
/** Source path (mp3/mp4/…), relative to the article media dir. */
|
|
26
|
+
src: string;
|
|
27
|
+
kind: 'audio' | 'video';
|
|
28
|
+
/**
|
|
29
|
+
* Seconds from the parent block's start when this clip begins. For an
|
|
30
|
+
* `anchor='document'` clip, seconds from the document start. Default 0.
|
|
31
|
+
*/
|
|
32
|
+
startAt: number;
|
|
33
|
+
/** Source in-point within the file (seconds). Default 0. */
|
|
34
|
+
clipStart?: number;
|
|
35
|
+
/** Source out-point within the file (seconds). Default: file/block end. */
|
|
36
|
+
clipEnd?: number;
|
|
37
|
+
/**
|
|
38
|
+
* When false (default) the clip stops at its block's end. When true it
|
|
39
|
+
* keeps playing past the block boundary until the clip itself finishes.
|
|
40
|
+
* Ignored for `anchor='document'` clips (they already span the timeline).
|
|
41
|
+
*/
|
|
42
|
+
spillover?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* `'block'` (default) — timed relative to the parent block. `'document'` —
|
|
45
|
+
* timed relative to the document start and able to span every block.
|
|
46
|
+
*/
|
|
47
|
+
anchor: 'block' | 'document';
|
|
48
|
+
/**
|
|
49
|
+
* 1-based source line of the authoring annotation, when derived from
|
|
50
|
+
* markdown. Enables round-tripping edits (e.g. the timeline editor rewriting
|
|
51
|
+
* `startAt`) back to the exact line. Absent for programmatically built clips.
|
|
52
|
+
*/
|
|
53
|
+
sourceLine?: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* A {@link MediaClip} resolved to absolute document-timeline coordinates.
|
|
57
|
+
* Produced by {@link resolveMediaSchedule}; consumed by the playback
|
|
58
|
+
* scheduler and the MP4 export.
|
|
59
|
+
*/
|
|
60
|
+
interface ScheduledClip {
|
|
61
|
+
id: string;
|
|
62
|
+
src: string;
|
|
63
|
+
kind: 'audio' | 'video';
|
|
64
|
+
/** Absolute doc-timeline second the clip starts. */
|
|
65
|
+
absoluteStart: number;
|
|
66
|
+
/** Absolute doc-timeline second the clip ends (exclusive). */
|
|
67
|
+
absoluteEnd: number;
|
|
68
|
+
/** Source in-point to seek to at `absoluteStart`. */
|
|
69
|
+
sourceIn: number;
|
|
70
|
+
anchor: 'block' | 'document';
|
|
71
|
+
/** Owning block id for block-anchored clips (for video re-homing/export). */
|
|
72
|
+
blockId?: string;
|
|
73
|
+
/** 1-based source line of the authoring annotation, when known. */
|
|
74
|
+
sourceLine?: number;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Flatten every block clip and document clip into absolute-timed
|
|
78
|
+
* `ScheduledClip`s. Pure — depends only on `doc`.
|
|
79
|
+
*/
|
|
80
|
+
declare function resolveMediaSchedule(doc: Doc): ScheduledClip[];
|
|
81
|
+
/**
|
|
82
|
+
* Total playback duration including any media that spills past the last
|
|
83
|
+
* block (or audio segment). Export uses this for the frame count and the
|
|
84
|
+
* player for its effective timeline length.
|
|
85
|
+
*/
|
|
86
|
+
declare function getDocPlaybackDuration(doc: Doc): number;
|
|
2
87
|
|
|
3
88
|
/**
|
|
4
89
|
* Viewport Configuration
|
|
@@ -158,237 +243,6 @@ declare function getSafeTextBounds(orientation: ViewportOrientation): {
|
|
|
158
243
|
bottom: string;
|
|
159
244
|
};
|
|
160
245
|
|
|
161
|
-
/**
|
|
162
|
-
* Theme System
|
|
163
|
-
*
|
|
164
|
-
* A Theme bundles color palette, typography, visual style, render-style
|
|
165
|
-
* algorithm, and per-block color schemes into one JSON-serializable object.
|
|
166
|
-
*
|
|
167
|
-
* Built-in themes and customizer-authored themes share this exact schema.
|
|
168
|
-
* Customizer-authored themes additionally specify `seedColors` so the few
|
|
169
|
-
* fields the user picked can be re-edited later; built-ins typically omit
|
|
170
|
-
* `seedColors` and ship with explicit `colors` already filled in.
|
|
171
|
-
*
|
|
172
|
-
* Design principles:
|
|
173
|
-
* - Fully JSON-serializable. No functions; no raw CSS font strings.
|
|
174
|
-
* - Font families are structured `FontFamily` references resolved by
|
|
175
|
-
* `resolveFontFamily()` at render time.
|
|
176
|
-
* - Doc carries an optional `themeId`; resolution happens at render time
|
|
177
|
-
* via `resolveTheme(id)`.
|
|
178
|
-
* - `createTheme` deep-merges a base theme with partial overrides;
|
|
179
|
-
* `compileTheme` fills in defaults and derives missing color slots from
|
|
180
|
-
* `seedColors`; both produce a complete `Theme`.
|
|
181
|
-
*/
|
|
182
|
-
|
|
183
|
-
/** Current Theme schema version. Bump on breaking changes; loader migrates. */
|
|
184
|
-
declare const THEME_SCHEMA_VERSION: "1";
|
|
185
|
-
type ThemeSchemaVersion = typeof THEME_SCHEMA_VERSION;
|
|
186
|
-
/**
|
|
187
|
-
* Core color palette for a theme. Every color is a `#rrggbb` hex string.
|
|
188
|
-
*/
|
|
189
|
-
interface ThemeColorPalette {
|
|
190
|
-
/** Primary accent color */
|
|
191
|
-
primary: string;
|
|
192
|
-
/** Secondary accent color */
|
|
193
|
-
secondary: string;
|
|
194
|
-
/** Background color (typically dark) */
|
|
195
|
-
background: string;
|
|
196
|
-
/** Lighter background for contrast panels */
|
|
197
|
-
backgroundLight: string;
|
|
198
|
-
/** Main text color */
|
|
199
|
-
text: string;
|
|
200
|
-
/** Muted/secondary text color */
|
|
201
|
-
textMuted: string;
|
|
202
|
-
/** Highlight/emphasis color */
|
|
203
|
-
highlight: string;
|
|
204
|
-
/** Warning/alert color */
|
|
205
|
-
warning: string;
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* A named color scheme used by templates for per-block color variation
|
|
209
|
-
* (e.g., statHighlight or sectionHeader).
|
|
210
|
-
*/
|
|
211
|
-
interface ThemeColorScheme {
|
|
212
|
-
/** Background fill */
|
|
213
|
-
bg: string;
|
|
214
|
-
/** Primary text tint */
|
|
215
|
-
text: string;
|
|
216
|
-
/** Accent / secondary tint */
|
|
217
|
-
accent: string;
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* Optional authoring metadata. When present and `colors` is partial,
|
|
221
|
-
* `compileTheme` derives missing color slots from these seeds via OKLCh
|
|
222
|
-
* lightening / darkening. Round-trips a customizer-authored theme back
|
|
223
|
-
* into editable form.
|
|
224
|
-
*/
|
|
225
|
-
interface ThemeSeedColors {
|
|
226
|
-
primary: string;
|
|
227
|
-
secondary?: string;
|
|
228
|
-
accent?: string;
|
|
229
|
-
background?: string;
|
|
230
|
-
text?: string;
|
|
231
|
-
}
|
|
232
|
-
/** Categorical bucket for a font family — drives default fallback. */
|
|
233
|
-
type FontFamilyKind = 'sans' | 'serif' | 'mono' | 'display';
|
|
234
|
-
/**
|
|
235
|
-
* Structured reference to a font family. Either a curated stack id (looked
|
|
236
|
-
* up in `AVAILABLE_FONT_STACKS`) or a custom user-supplied name with a
|
|
237
|
-
* structured fallback bucket. Themes never carry raw CSS family strings.
|
|
238
|
-
*/
|
|
239
|
-
type FontFamily = {
|
|
240
|
-
stackId: string;
|
|
241
|
-
} | {
|
|
242
|
-
custom: {
|
|
243
|
-
name: string;
|
|
244
|
-
fallback: 'serif' | 'sans-serif' | 'monospace' | 'system-ui';
|
|
245
|
-
};
|
|
246
|
-
};
|
|
247
|
-
/**
|
|
248
|
-
* Typography settings for a theme.
|
|
249
|
-
*/
|
|
250
|
-
interface ThemeTypography {
|
|
251
|
-
/** Font family for body / description text */
|
|
252
|
-
bodyFont: FontFamily;
|
|
253
|
-
/** Font family for titles and headings */
|
|
254
|
-
titleFont: FontFamily;
|
|
255
|
-
/** Font family for code / monospaced text (optional) */
|
|
256
|
-
monoFont?: FontFamily;
|
|
257
|
-
/** Multiplier applied to LayoutHints.titleScale (default 1.0) */
|
|
258
|
-
titleScale?: number;
|
|
259
|
-
/** Multiplier applied to LayoutHints.bodyScale (default 1.0) */
|
|
260
|
-
bodyScale?: number;
|
|
261
|
-
/** Default body line height (default 1.4) */
|
|
262
|
-
lineHeight?: number;
|
|
263
|
-
/** Default title line height */
|
|
264
|
-
titleLineHeight?: number;
|
|
265
|
-
/** Default title font weight */
|
|
266
|
-
titleWeight?: 'normal' | 'bold';
|
|
267
|
-
}
|
|
268
|
-
/**
|
|
269
|
-
* Global visual-style knobs that templates consult.
|
|
270
|
-
*/
|
|
271
|
-
interface ThemeStyle {
|
|
272
|
-
/** Default border radius for cards / shapes (px) */
|
|
273
|
-
borderRadius?: number;
|
|
274
|
-
/** Whether templates should default to text shadows */
|
|
275
|
-
textShadow?: boolean;
|
|
276
|
-
/** Darkness of overlay on image-backed blocks (0–1) */
|
|
277
|
-
overlayOpacity?: number;
|
|
278
|
-
/** Multiplier on all animation durations (1.0 = normal, <1 faster, >1 slower) */
|
|
279
|
-
animationSpeed?: number;
|
|
280
|
-
/** Default horizontal padding for text (percentage string, e.g. "5%") */
|
|
281
|
-
blockPadding?: string;
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* Render-style algorithm preset. Controls layout tweaks, default animations,
|
|
285
|
-
* transitions, and per-template behavioral hints.
|
|
286
|
-
*/
|
|
287
|
-
interface RenderStyle {
|
|
288
|
-
/** Identifier for this algorithmic approach (e.g. "documentary", "magazine") */
|
|
289
|
-
name: string;
|
|
290
|
-
/** Partial overrides merged onto the orientation-based LayoutHints */
|
|
291
|
-
layoutOverrides?: Partial<LayoutHints>;
|
|
292
|
-
/** Default entrance animation for text layers */
|
|
293
|
-
defaultTextAnimation?: AnimationType;
|
|
294
|
-
/** Default animation for background / image layers */
|
|
295
|
-
defaultImageAnimation?: AnimationType;
|
|
296
|
-
/** Whether to apply Ken Burns ambient motion to images by default */
|
|
297
|
-
ambientMotion?: boolean;
|
|
298
|
-
/** Default block-to-block transition */
|
|
299
|
-
defaultTransition?: {
|
|
300
|
-
type: TransitionType;
|
|
301
|
-
duration?: number;
|
|
302
|
-
};
|
|
303
|
-
/**
|
|
304
|
-
* Per-template behavioral hints. Keys are template names, values are
|
|
305
|
-
* string/number/boolean maps that templates can read to vary their output.
|
|
306
|
-
* Templates that consume hints publish a `hintSchema` export documenting
|
|
307
|
-
* the keys they recognise.
|
|
308
|
-
*/
|
|
309
|
-
templateHints?: Record<string, Record<string, string | number | boolean>>;
|
|
310
|
-
}
|
|
311
|
-
/**
|
|
312
|
-
* A complete, JSON-serializable theme definition. Built-in and customizer-
|
|
313
|
-
* authored themes share this exact shape.
|
|
314
|
-
*/
|
|
315
|
-
interface Theme {
|
|
316
|
-
/** Schema version. Always '1' for now. */
|
|
317
|
-
schemaVersion: ThemeSchemaVersion;
|
|
318
|
-
/** Unique identifier (e.g. "documentary") */
|
|
319
|
-
id: string;
|
|
320
|
-
/** Human-readable display name */
|
|
321
|
-
name: string;
|
|
322
|
-
/** Short description for theme pickers */
|
|
323
|
-
description?: string;
|
|
324
|
-
/** Optional authoring seeds (customizer fills these; built-ins typically omit) */
|
|
325
|
-
seedColors?: ThemeSeedColors;
|
|
326
|
-
/** Color palette */
|
|
327
|
-
colors: ThemeColorPalette;
|
|
328
|
-
/** Typography settings */
|
|
329
|
-
typography: ThemeTypography;
|
|
330
|
-
/** Global visual-style knobs */
|
|
331
|
-
style: ThemeStyle;
|
|
332
|
-
/** Algorithmic render-style preset */
|
|
333
|
-
renderStyle: RenderStyle;
|
|
334
|
-
/**
|
|
335
|
-
* Named color schemes for per-block color variation.
|
|
336
|
-
* Templates reference these by name (e.g. "blue", "warm").
|
|
337
|
-
*/
|
|
338
|
-
colorSchemes: Record<string, ThemeColorScheme>;
|
|
339
|
-
/** Optional persistent layers baked into the theme */
|
|
340
|
-
persistentLayers?: PersistentLayerConfig;
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* Recursively makes every property optional.
|
|
344
|
-
*/
|
|
345
|
-
type DeepPartial<T> = {
|
|
346
|
-
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
347
|
-
};
|
|
348
|
-
/**
|
|
349
|
-
* Create a new theme by deep-merging overrides onto a base theme.
|
|
350
|
-
* The returned theme gets its own `id` if one is provided in overrides,
|
|
351
|
-
* otherwise keeps the base theme's `id` suffixed with "-custom".
|
|
352
|
-
*/
|
|
353
|
-
declare function createTheme(base: Theme, overrides: DeepPartial<Theme>): Theme;
|
|
354
|
-
/**
|
|
355
|
-
* A Surface Scheme is the light/dark axis, orthogonal to the editorial
|
|
356
|
-
* identity of a Theme. A Theme chooses voice (serif vs sans, muted vs
|
|
357
|
-
* bold, documentary vs magazine); a SurfaceScheme chooses what the paper
|
|
358
|
-
* looks like. Any theme can render on either surface.
|
|
359
|
-
*/
|
|
360
|
-
interface SurfaceScheme {
|
|
361
|
-
/** Identifier — 'light', 'dark', or a custom id. */
|
|
362
|
-
id: string;
|
|
363
|
-
background: string;
|
|
364
|
-
backgroundLight: string;
|
|
365
|
-
text: string;
|
|
366
|
-
textMuted: string;
|
|
367
|
-
}
|
|
368
|
-
/** Near-white paper with dark text — standard light mode. */
|
|
369
|
-
declare const LIGHT_SURFACE: SurfaceScheme;
|
|
370
|
-
/** Dark charcoal paper with light text — standard dark mode. */
|
|
371
|
-
declare const DARK_SURFACE: SurfaceScheme;
|
|
372
|
-
/**
|
|
373
|
-
* Overlay a SurfaceScheme's surface colors onto a Theme's palette,
|
|
374
|
-
* leaving everything else (primary, highlight, warning, typography,
|
|
375
|
-
* style, renderStyle, colorSchemes) untouched.
|
|
376
|
-
*/
|
|
377
|
-
declare function applySurface(theme: Theme, surface: SurfaceScheme): Theme;
|
|
378
|
-
/**
|
|
379
|
-
* Register a Theme so it can be looked up by id via `resolveTheme(id)`.
|
|
380
|
-
* Lets `Doc.themeId` round-trip through Doc serialization for custom themes.
|
|
381
|
-
*
|
|
382
|
-
* Registered themes take precedence over built-ins with the same id.
|
|
383
|
-
*/
|
|
384
|
-
declare function registerTheme(theme: Theme): void;
|
|
385
|
-
/** Remove a previously registered theme. */
|
|
386
|
-
declare function unregisterTheme(id: string): void;
|
|
387
|
-
/** Snapshot of all currently registered (non-built-in) themes. */
|
|
388
|
-
declare function getRegisteredThemes(): Theme[];
|
|
389
|
-
/** @internal — used by themeLibrary's `resolveTheme` to check the registry first. */
|
|
390
|
-
declare function lookupRegisteredTheme(id: string | undefined): Theme | undefined;
|
|
391
|
-
|
|
392
246
|
/**
|
|
393
247
|
* Block Templates Schema
|
|
394
248
|
*
|
|
@@ -477,6 +331,12 @@ interface BaseTemplateBlock {
|
|
|
477
331
|
* Used with sourceStartTime to precisely position the block.
|
|
478
332
|
*/
|
|
479
333
|
sourceDuration?: number;
|
|
334
|
+
/**
|
|
335
|
+
* Per-block override for the theme's photographic image grade
|
|
336
|
+
* (`theme.style.imageTreatment`). `'none'` opts this block's imagery out;
|
|
337
|
+
* a treatment type forces that grade regardless of the theme.
|
|
338
|
+
*/
|
|
339
|
+
imageTreatment?: 'none' | 'mono' | 'duotone' | 'warm' | 'cool';
|
|
480
340
|
}
|
|
481
341
|
/**
|
|
482
342
|
* Title block - doc intro with large title and subtitle.
|
|
@@ -826,6 +686,75 @@ interface VideoPullQuoteInput extends BaseTemplateBlock {
|
|
|
826
686
|
license?: string;
|
|
827
687
|
};
|
|
828
688
|
}
|
|
689
|
+
/**
|
|
690
|
+
* Diagram block - renders child headings as a node-and-edge diagram.
|
|
691
|
+
*
|
|
692
|
+
* Unlike other templates, the diagram template reads its content from
|
|
693
|
+
* the parent block's `children` (passed via `context.children`) — each
|
|
694
|
+
* child heading becomes a node, positioned by its `x`/`y` and connected
|
|
695
|
+
* by its `connectsTo`. Per-diagram options on this input control overall
|
|
696
|
+
* appearance; per-node data lives on the child blocks themselves.
|
|
697
|
+
*/
|
|
698
|
+
interface DiagramBlockInput extends BaseTemplateBlock {
|
|
699
|
+
template: 'diagram';
|
|
700
|
+
/** Optional diagram title displayed above the canvas. */
|
|
701
|
+
title?: string;
|
|
702
|
+
/** Color scheme for nodes and edges. */
|
|
703
|
+
colorScheme?: ColorScheme;
|
|
704
|
+
/** Node shape style (default: 'rounded'). */
|
|
705
|
+
nodeShape?: 'rounded' | 'rect' | 'pill';
|
|
706
|
+
/** Edge routing (default: 'curved'). */
|
|
707
|
+
edgeStyle?: 'curved' | 'straight' | 'orthogonal';
|
|
708
|
+
/** Marker at each edge's start (default: 'none'). */
|
|
709
|
+
startStyle?: MarkerStyle;
|
|
710
|
+
/** Marker at each edge's end (default: 'arrow'). */
|
|
711
|
+
endStyle?: MarkerStyle;
|
|
712
|
+
/** Edge line style (default: 'solid'). */
|
|
713
|
+
lineStyle?: 'solid' | 'dashed' | 'dotted';
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* Free-form 2D canvas block (`layout`). Like `drawing`/`diagram`, the
|
|
717
|
+
* `layout` template is a children-driven container: each child heading is
|
|
718
|
+
* one absolutely-positioned layer (`{[text …]}` / `{[rectangle …]}` /
|
|
719
|
+
* `{[image …]}`), read from `context.children`. A text box's content is the
|
|
720
|
+
* child's body markdown. Backed by the `layoutBlock` template.
|
|
721
|
+
*
|
|
722
|
+
* (Legacy documents stored layers as a base64-JSON `layers=` param on the
|
|
723
|
+
* heading; the editor auto-migrates those to child sub-blocks on first edit.)
|
|
724
|
+
*/
|
|
725
|
+
interface RawLayersInput extends BaseTemplateBlock {
|
|
726
|
+
template: 'layout';
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* Drawing block — renders child headings as free-form shapes on a canvas.
|
|
730
|
+
*
|
|
731
|
+
* Like `diagram`, the drawing template reads its content from the parent
|
|
732
|
+
* block's `children` (passed via `context.children`). Each child heading
|
|
733
|
+
* is a shape: its `{[shape …]}` annotation names the primitive
|
|
734
|
+
* (`rectangle`/`rect`, `circle`, `line`, `arrow`, `path`, `text`) and
|
|
735
|
+
* carries geometry/style as params; its `{#id}` makes it referenceable;
|
|
736
|
+
* its heading text is the shape label and its body text an optional
|
|
737
|
+
* sublabel. Connectors (`line`/`arrow` with `from`/`to`) join shapes by id.
|
|
738
|
+
*
|
|
739
|
+
* Coordinates are author-defined units; the template fits the bounding box
|
|
740
|
+
* of all shapes to the viewport (same scaling as `diagram`), so authors
|
|
741
|
+
* don't have to think in absolute pixels.
|
|
742
|
+
*
|
|
743
|
+
* Legacy drawings authored visually persist their `Layer[]` as a base64
|
|
744
|
+
* `layers="…"` Pandoc param instead of children; the template decodes and
|
|
745
|
+
* returns those directly when no children are present (see `drawingBlock`).
|
|
746
|
+
*/
|
|
747
|
+
interface DrawingBlockInput extends BaseTemplateBlock {
|
|
748
|
+
template: 'drawing';
|
|
749
|
+
/** Optional title displayed above the canvas. */
|
|
750
|
+
title?: string;
|
|
751
|
+
/** Color scheme for shapes that don't pin their own fill/stroke. */
|
|
752
|
+
colorScheme?: ColorScheme;
|
|
753
|
+
/** Default fill for shapes that don't specify one (default: 'none'). */
|
|
754
|
+
fill?: string;
|
|
755
|
+
/** Default stroke for shapes that don't specify one (default: theme text). */
|
|
756
|
+
stroke?: string;
|
|
757
|
+
}
|
|
829
758
|
/**
|
|
830
759
|
* Data table - renders a themed table with headers and rows.
|
|
831
760
|
* Ideal for structured data, comparisons, and reference information.
|
|
@@ -846,7 +775,7 @@ interface DataTableInput extends BaseTemplateBlock {
|
|
|
846
775
|
/**
|
|
847
776
|
* Union of all template block types.
|
|
848
777
|
*/
|
|
849
|
-
type TemplateBlock = TitleBlockInput | SectionHeaderInput | StatHighlightInput | QuoteBlockInput | FactCardInput | TwoColumnInput | DateEventInput | ImageWithCaptionInput | LeftFeatureInput | RightFeatureInput | MapBlockInput | FullBleedQuoteInput | ListBlockInput | PhotoGridInput | DefinitionCardInput | ComparisonBarInput | PullQuoteInput | VideoWithCaptionInput | VideoPullQuoteInput | DataTableInput;
|
|
778
|
+
type TemplateBlock = TitleBlockInput | SectionHeaderInput | StatHighlightInput | QuoteBlockInput | FactCardInput | TwoColumnInput | DateEventInput | ImageWithCaptionInput | LeftFeatureInput | RightFeatureInput | MapBlockInput | FullBleedQuoteInput | ListBlockInput | PhotoGridInput | DefinitionCardInput | ComparisonBarInput | PullQuoteInput | VideoWithCaptionInput | VideoPullQuoteInput | DataTableInput | DiagramBlockInput | DrawingBlockInput | RawLayersInput;
|
|
850
779
|
/**
|
|
851
780
|
* A block can be either a raw Block or a TemplateBlock.
|
|
852
781
|
*/
|
|
@@ -874,6 +803,20 @@ interface TemplateContext {
|
|
|
874
803
|
orientation: ViewportOrientation;
|
|
875
804
|
/** Layout hints for this orientation */
|
|
876
805
|
layout: LayoutHints;
|
|
806
|
+
/**
|
|
807
|
+
* The block's direct children (set by `getLayers` when the block has
|
|
808
|
+
* `children`). Most templates ignore this; aggregate templates like
|
|
809
|
+
* `diagram` consume it to render each child as part of their output.
|
|
810
|
+
*/
|
|
811
|
+
children?: Block[];
|
|
812
|
+
/**
|
|
813
|
+
* The source block being expanded. Used by user-defined custom
|
|
814
|
+
* templates so the token resolver can substitute `{title}`,
|
|
815
|
+
* `{content}`, `{children}`, and `{image:N}` against the block's
|
|
816
|
+
* data at render time. Built-in templates ignore this and rely on
|
|
817
|
+
* their typed `input` parameters instead.
|
|
818
|
+
*/
|
|
819
|
+
block?: Block;
|
|
877
820
|
}
|
|
878
821
|
/**
|
|
879
822
|
* Create a template context with viewport-derived values.
|
|
@@ -929,11 +872,11 @@ interface PersistentLayerTemplate {
|
|
|
929
872
|
/**
|
|
930
873
|
* Available persistent layer template types.
|
|
931
874
|
*/
|
|
932
|
-
type PersistentLayerTemplateType = 'solidBackground' | 'gradientBackground' | 'imageBackground' | 'patternBackground' | 'titleCaption' | 'cornerBranding' | 'progressIndicator';
|
|
875
|
+
type PersistentLayerTemplateType = 'solidBackground' | 'gradientBackground' | 'imageBackground' | 'patternBackground' | 'vignette' | 'ambientGradient' | 'titleCaption' | 'cornerBranding' | 'progressIndicator';
|
|
933
876
|
/**
|
|
934
877
|
* Union of all persistent layer template configs.
|
|
935
878
|
*/
|
|
936
|
-
type PersistentLayerTemplateConfig = SolidBackgroundConfig | GradientBackgroundConfig | ImageBackgroundConfig | PatternBackgroundConfig | TitleCaptionConfig | CornerBrandingConfig | ProgressIndicatorConfig;
|
|
879
|
+
type PersistentLayerTemplateConfig = SolidBackgroundConfig | GradientBackgroundConfig | ImageBackgroundConfig | PatternBackgroundConfig | VignetteConfig | AmbientGradientConfig | TitleCaptionConfig | CornerBrandingConfig | ProgressIndicatorConfig;
|
|
937
880
|
/**
|
|
938
881
|
* Solid color background.
|
|
939
882
|
*/
|
|
@@ -980,6 +923,30 @@ interface PatternBackgroundConfig {
|
|
|
980
923
|
/** Pattern scale multiplier */
|
|
981
924
|
scale?: number;
|
|
982
925
|
}
|
|
926
|
+
/**
|
|
927
|
+
* Soft radial vignette (top layer) — transparent center darkening toward
|
|
928
|
+
* the frame edges. The classic film-look framing device.
|
|
929
|
+
*/
|
|
930
|
+
interface VignetteConfig {
|
|
931
|
+
type: 'vignette';
|
|
932
|
+
/** Edge darkness 0-1 (default 0.3). */
|
|
933
|
+
strength?: number;
|
|
934
|
+
/** Vignette color (default black). */
|
|
935
|
+
color?: string;
|
|
936
|
+
}
|
|
937
|
+
/**
|
|
938
|
+
* Slowly drifting surface gradient (bottom layer). Colors default to the
|
|
939
|
+
* theme's surface family at expansion time.
|
|
940
|
+
*/
|
|
941
|
+
interface AmbientGradientConfig {
|
|
942
|
+
type: 'ambientGradient';
|
|
943
|
+
/** Gradient start color. */
|
|
944
|
+
from?: string;
|
|
945
|
+
/** Gradient end color. */
|
|
946
|
+
to?: string;
|
|
947
|
+
/** Drift loop duration in seconds (default 40). */
|
|
948
|
+
duration?: number;
|
|
949
|
+
}
|
|
983
950
|
/**
|
|
984
951
|
* Title caption overlay (article title in corner).
|
|
985
952
|
*/
|
|
@@ -1024,20 +991,339 @@ interface ProgressIndicatorConfig {
|
|
|
1024
991
|
}
|
|
1025
992
|
|
|
1026
993
|
/**
|
|
1027
|
-
*
|
|
994
|
+
* Theme System
|
|
1028
995
|
*
|
|
1029
|
-
*
|
|
1030
|
-
*
|
|
1031
|
-
* with text overlays, images, and transitions synchronized to audio.
|
|
996
|
+
* A Theme bundles color palette, typography, visual style, render-style
|
|
997
|
+
* algorithm, and per-block color schemes into one JSON-serializable object.
|
|
1032
998
|
*
|
|
1033
|
-
*
|
|
1034
|
-
*
|
|
1035
|
-
*
|
|
1036
|
-
*
|
|
999
|
+
* Built-in themes and customizer-authored themes share this exact schema.
|
|
1000
|
+
* Customizer-authored themes additionally specify `seedColors` so the few
|
|
1001
|
+
* fields the user picked can be re-edited later; built-ins typically omit
|
|
1002
|
+
* `seedColors` and ship with explicit `colors` already filled in.
|
|
1037
1003
|
*
|
|
1038
|
-
*
|
|
1039
|
-
*
|
|
1004
|
+
* Design principles:
|
|
1005
|
+
* - Fully JSON-serializable. No functions; no raw CSS font strings.
|
|
1006
|
+
* - Font families are structured `FontFamily` references resolved by
|
|
1007
|
+
* `resolveFontFamily()` at render time.
|
|
1008
|
+
* - Doc carries an optional `themeId`; resolution happens at render time
|
|
1009
|
+
* via `resolveTheme(id)`.
|
|
1010
|
+
* - `createTheme` deep-merges a base theme with partial overrides;
|
|
1011
|
+
* `compileTheme` fills in defaults and derives missing color slots from
|
|
1012
|
+
* `seedColors`; both produce a complete `Theme`.
|
|
1013
|
+
*/
|
|
1014
|
+
|
|
1015
|
+
/** Current Theme schema version. Bump on breaking changes; loader migrates. */
|
|
1016
|
+
declare const THEME_SCHEMA_VERSION: "1";
|
|
1017
|
+
type ThemeSchemaVersion = typeof THEME_SCHEMA_VERSION;
|
|
1018
|
+
/**
|
|
1019
|
+
* Frontmatter key under which a document inlines its custom Theme
|
|
1020
|
+
* definitions. The theme analog of `FRONTMATTER_CUSTOM_TEMPLATES_KEY`
|
|
1021
|
+
* (custom block templates). See `doc/customThemesFrontmatter.ts` for the
|
|
1022
|
+
* codec and `doc/resolveDocTheme.ts` for doc-scoped resolution.
|
|
1023
|
+
*/
|
|
1024
|
+
declare const FRONTMATTER_CUSTOM_THEMES_KEY = "squisq-custom-themes";
|
|
1025
|
+
/**
|
|
1026
|
+
* Core color palette for a theme. Every color is a `#rrggbb` hex string.
|
|
1027
|
+
*/
|
|
1028
|
+
interface ThemeColorPalette {
|
|
1029
|
+
/** Primary accent color */
|
|
1030
|
+
primary: string;
|
|
1031
|
+
/** Secondary accent color */
|
|
1032
|
+
secondary: string;
|
|
1033
|
+
/** Background color (typically dark) */
|
|
1034
|
+
background: string;
|
|
1035
|
+
/** Lighter background for contrast panels */
|
|
1036
|
+
backgroundLight: string;
|
|
1037
|
+
/** Main text color */
|
|
1038
|
+
text: string;
|
|
1039
|
+
/** Muted/secondary text color */
|
|
1040
|
+
textMuted: string;
|
|
1041
|
+
/** Highlight/emphasis color */
|
|
1042
|
+
highlight: string;
|
|
1043
|
+
/** Warning/alert color */
|
|
1044
|
+
warning: string;
|
|
1045
|
+
}
|
|
1046
|
+
/**
|
|
1047
|
+
* A named color scheme used by templates for per-block color variation
|
|
1048
|
+
* (e.g., statHighlight or sectionHeader).
|
|
1049
|
+
*/
|
|
1050
|
+
interface ThemeColorScheme {
|
|
1051
|
+
/** Background fill */
|
|
1052
|
+
bg: string;
|
|
1053
|
+
/** Primary text tint */
|
|
1054
|
+
text: string;
|
|
1055
|
+
/** Accent / secondary tint */
|
|
1056
|
+
accent: string;
|
|
1057
|
+
}
|
|
1058
|
+
/**
|
|
1059
|
+
* Optional authoring metadata. When present and `colors` is partial,
|
|
1060
|
+
* `compileTheme` derives missing color slots from these seeds via OKLCh
|
|
1061
|
+
* lightening / darkening. Round-trips a customizer-authored theme back
|
|
1062
|
+
* into editable form.
|
|
1040
1063
|
*/
|
|
1064
|
+
interface ThemeSeedColors {
|
|
1065
|
+
primary: string;
|
|
1066
|
+
secondary?: string;
|
|
1067
|
+
accent?: string;
|
|
1068
|
+
background?: string;
|
|
1069
|
+
text?: string;
|
|
1070
|
+
}
|
|
1071
|
+
/** Categorical bucket for a font family — drives default fallback. */
|
|
1072
|
+
type FontFamilyKind = 'sans' | 'serif' | 'mono' | 'display';
|
|
1073
|
+
/**
|
|
1074
|
+
* Structured reference to a font family. Either a curated stack id (looked
|
|
1075
|
+
* up in `AVAILABLE_FONT_STACKS`) or a custom user-supplied name with a
|
|
1076
|
+
* structured fallback bucket. Themes never carry raw CSS family strings.
|
|
1077
|
+
*/
|
|
1078
|
+
type FontFamily = {
|
|
1079
|
+
stackId: string;
|
|
1080
|
+
} | {
|
|
1081
|
+
custom: {
|
|
1082
|
+
name: string;
|
|
1083
|
+
fallback: 'serif' | 'sans-serif' | 'monospace' | 'system-ui';
|
|
1084
|
+
};
|
|
1085
|
+
};
|
|
1086
|
+
/**
|
|
1087
|
+
* Typography settings for a theme.
|
|
1088
|
+
*/
|
|
1089
|
+
interface ThemeTypography {
|
|
1090
|
+
/** Font family for body / description text */
|
|
1091
|
+
bodyFont: FontFamily;
|
|
1092
|
+
/** Font family for titles and headings */
|
|
1093
|
+
titleFont: FontFamily;
|
|
1094
|
+
/** Font family for code / monospaced text (optional) */
|
|
1095
|
+
monoFont?: FontFamily;
|
|
1096
|
+
/** Multiplier applied to LayoutHints.titleScale (default 1.0) */
|
|
1097
|
+
titleScale?: number;
|
|
1098
|
+
/** Multiplier applied to LayoutHints.bodyScale (default 1.0) */
|
|
1099
|
+
bodyScale?: number;
|
|
1100
|
+
/** Default body line height (default 1.4) */
|
|
1101
|
+
lineHeight?: number;
|
|
1102
|
+
/** Default title line height */
|
|
1103
|
+
titleLineHeight?: number;
|
|
1104
|
+
/** Default title font weight */
|
|
1105
|
+
titleWeight?: 'normal' | 'bold';
|
|
1106
|
+
}
|
|
1107
|
+
/**
|
|
1108
|
+
* Global visual-style knobs that templates consult.
|
|
1109
|
+
*/
|
|
1110
|
+
interface ThemeStyle {
|
|
1111
|
+
/** Default border radius for cards / shapes (px) */
|
|
1112
|
+
borderRadius?: number;
|
|
1113
|
+
/** Whether templates should default to text shadows */
|
|
1114
|
+
textShadow?: boolean;
|
|
1115
|
+
/** Darkness of overlay on image-backed blocks (0–1) */
|
|
1116
|
+
overlayOpacity?: number;
|
|
1117
|
+
/** Multiplier on all animation durations (1.0 = normal, <1 faster, >1 slower) */
|
|
1118
|
+
animationSpeed?: number;
|
|
1119
|
+
/** Default horizontal padding for text (percentage string, e.g. "5%") */
|
|
1120
|
+
blockPadding?: string;
|
|
1121
|
+
/**
|
|
1122
|
+
* Photographic grade applied to template imagery (full-bleed photos,
|
|
1123
|
+
* feature halves, accent strips) so photos look native to the theme.
|
|
1124
|
+
* Duotone tints default to the theme primary. Blocks opt out per
|
|
1125
|
+
* template via `imageTreatment: 'none'`.
|
|
1126
|
+
*/
|
|
1127
|
+
imageTreatment?: ImageTreatment;
|
|
1128
|
+
}
|
|
1129
|
+
/**
|
|
1130
|
+
* Render-style algorithm preset. Controls layout tweaks, default animations,
|
|
1131
|
+
* transitions, and per-template behavioral hints.
|
|
1132
|
+
*/
|
|
1133
|
+
interface RenderStyle {
|
|
1134
|
+
/** Identifier for this algorithmic approach (e.g. "documentary", "magazine") */
|
|
1135
|
+
name: string;
|
|
1136
|
+
/** Partial overrides merged onto the orientation-based LayoutHints */
|
|
1137
|
+
layoutOverrides?: Partial<LayoutHints>;
|
|
1138
|
+
/** Default entrance animation for text layers */
|
|
1139
|
+
defaultTextAnimation?: AnimationType;
|
|
1140
|
+
/** Default animation for background / image layers */
|
|
1141
|
+
defaultImageAnimation?: AnimationType;
|
|
1142
|
+
/** Whether to apply Ken Burns ambient motion to images by default */
|
|
1143
|
+
ambientMotion?: boolean;
|
|
1144
|
+
/** Default block-to-block transition */
|
|
1145
|
+
defaultTransition?: {
|
|
1146
|
+
type: TransitionType;
|
|
1147
|
+
duration?: number;
|
|
1148
|
+
};
|
|
1149
|
+
/**
|
|
1150
|
+
* Per-template behavioral hints. Keys are template names, values are
|
|
1151
|
+
* string/number/boolean maps that templates can read to vary their output.
|
|
1152
|
+
* Templates that consume hints publish a `hintSchema` export documenting
|
|
1153
|
+
* the keys they recognise.
|
|
1154
|
+
*/
|
|
1155
|
+
templateHints?: Record<string, Record<string, string | number | boolean>>;
|
|
1156
|
+
}
|
|
1157
|
+
/**
|
|
1158
|
+
* A complete, JSON-serializable theme definition. Built-in and customizer-
|
|
1159
|
+
* authored themes share this exact shape.
|
|
1160
|
+
*/
|
|
1161
|
+
interface Theme {
|
|
1162
|
+
/** Schema version. Always '1' for now. */
|
|
1163
|
+
schemaVersion: ThemeSchemaVersion;
|
|
1164
|
+
/** Unique identifier (e.g. "documentary") */
|
|
1165
|
+
id: string;
|
|
1166
|
+
/** Human-readable display name */
|
|
1167
|
+
name: string;
|
|
1168
|
+
/** Short description for theme pickers */
|
|
1169
|
+
description?: string;
|
|
1170
|
+
/**
|
|
1171
|
+
* Id of the theme this custom theme was derived from, if any. Recorded
|
|
1172
|
+
* by `compileTheme({ base })` so a customizer can re-open the theme and
|
|
1173
|
+
* re-inherit the base's render style / color schemes / typography.
|
|
1174
|
+
* Absent on built-ins.
|
|
1175
|
+
*/
|
|
1176
|
+
basedOn?: string;
|
|
1177
|
+
/** Optional authoring seeds (customizer fills these; built-ins typically omit) */
|
|
1178
|
+
seedColors?: ThemeSeedColors;
|
|
1179
|
+
/** Color palette */
|
|
1180
|
+
colors: ThemeColorPalette;
|
|
1181
|
+
/** Typography settings */
|
|
1182
|
+
typography: ThemeTypography;
|
|
1183
|
+
/** Global visual-style knobs */
|
|
1184
|
+
style: ThemeStyle;
|
|
1185
|
+
/** Algorithmic render-style preset */
|
|
1186
|
+
renderStyle: RenderStyle;
|
|
1187
|
+
/**
|
|
1188
|
+
* Named color schemes for per-block color variation.
|
|
1189
|
+
* Templates reference these by name (e.g. "blue", "warm").
|
|
1190
|
+
*/
|
|
1191
|
+
colorSchemes: Record<string, ThemeColorScheme>;
|
|
1192
|
+
/** Optional persistent layers baked into the theme */
|
|
1193
|
+
persistentLayers?: PersistentLayerConfig;
|
|
1194
|
+
}
|
|
1195
|
+
/**
|
|
1196
|
+
* Recursively makes every property optional.
|
|
1197
|
+
*/
|
|
1198
|
+
type DeepPartial<T> = {
|
|
1199
|
+
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
1200
|
+
};
|
|
1201
|
+
/**
|
|
1202
|
+
* Create a new theme by deep-merging overrides onto a base theme.
|
|
1203
|
+
* The returned theme gets its own `id` if one is provided in overrides,
|
|
1204
|
+
* otherwise keeps the base theme's `id` suffixed with "-custom".
|
|
1205
|
+
*/
|
|
1206
|
+
declare function createTheme(base: Theme, overrides: DeepPartial<Theme>): Theme;
|
|
1207
|
+
/**
|
|
1208
|
+
* A Surface Scheme is the light/dark axis, orthogonal to the editorial
|
|
1209
|
+
* identity of a Theme. A Theme chooses voice (serif vs sans, muted vs
|
|
1210
|
+
* bold, documentary vs magazine); a SurfaceScheme chooses what the paper
|
|
1211
|
+
* looks like. Any theme can render on either surface.
|
|
1212
|
+
*/
|
|
1213
|
+
interface SurfaceScheme {
|
|
1214
|
+
/** Identifier — 'light', 'dark', or a custom id. */
|
|
1215
|
+
id: string;
|
|
1216
|
+
background: string;
|
|
1217
|
+
backgroundLight: string;
|
|
1218
|
+
text: string;
|
|
1219
|
+
textMuted: string;
|
|
1220
|
+
}
|
|
1221
|
+
/** Near-white paper with dark text — standard light mode. */
|
|
1222
|
+
declare const LIGHT_SURFACE: SurfaceScheme;
|
|
1223
|
+
/** Dark charcoal paper with light text — standard dark mode. */
|
|
1224
|
+
declare const DARK_SURFACE: SurfaceScheme;
|
|
1225
|
+
/**
|
|
1226
|
+
* Overlay a SurfaceScheme's surface colors onto a Theme's palette,
|
|
1227
|
+
* leaving everything else (primary, highlight, warning, typography,
|
|
1228
|
+
* style, renderStyle, colorSchemes) untouched.
|
|
1229
|
+
*/
|
|
1230
|
+
declare function applySurface(theme: Theme, surface: SurfaceScheme): Theme;
|
|
1231
|
+
/**
|
|
1232
|
+
* Register a Theme so it can be looked up by id via `resolveTheme(id)`.
|
|
1233
|
+
* Lets `Doc.themeId` round-trip through Doc serialization for custom themes.
|
|
1234
|
+
*
|
|
1235
|
+
* Registered themes take precedence over built-ins with the same id.
|
|
1236
|
+
*/
|
|
1237
|
+
declare function registerTheme(theme: Theme): void;
|
|
1238
|
+
/** Remove a previously registered theme. */
|
|
1239
|
+
declare function unregisterTheme(id: string): void;
|
|
1240
|
+
/** Snapshot of all currently registered (non-built-in) themes. */
|
|
1241
|
+
declare function getRegisteredThemes(): Theme[];
|
|
1242
|
+
/** @internal — used by themeLibrary's `resolveTheme` to check the registry first. */
|
|
1243
|
+
declare function lookupRegisteredTheme(id: string | undefined): Theme | undefined;
|
|
1244
|
+
|
|
1245
|
+
/**
|
|
1246
|
+
* Custom Templates Schema
|
|
1247
|
+
*
|
|
1248
|
+
* User-defined block layout templates. The author designs a visual
|
|
1249
|
+
* layout once (in the editor's TemplateDesigner) and saves it as a
|
|
1250
|
+
* `CustomTemplateDefinition`. The definition lives either in the
|
|
1251
|
+
* document's frontmatter (per-doc, portable, ships with the markdown)
|
|
1252
|
+
* or in the user's local library (cross-doc reuse via localStorage).
|
|
1253
|
+
*
|
|
1254
|
+
* A custom template's content is just a `Layer[]` — the same shape that
|
|
1255
|
+
* built-in templates emit at expansion time. The novel bit is
|
|
1256
|
+
* *placeholder tokens*: TextLayer / ImageLayer content fields may carry
|
|
1257
|
+
* strings like `{title}`, `{content}`, `{children}`, or `{image:N}`
|
|
1258
|
+
* that the resolver (see `doc/templates/tokens/resolveTokens.ts`)
|
|
1259
|
+
* substitutes against the source Block at render time.
|
|
1260
|
+
*
|
|
1261
|
+
* Responsiveness model: every numeric position field in `layers` is
|
|
1262
|
+
* stored as a `%`-string relative to `viewport`, so the same template
|
|
1263
|
+
* renders correctly at any of Squisq's viewport presets (landscape,
|
|
1264
|
+
* portrait, square). The `viewport` field itself is purely an
|
|
1265
|
+
* authoring-time reference — it tells the designer canvas which aspect
|
|
1266
|
+
* ratio to mount with, and the thumbnail renderer which viewBox to use.
|
|
1267
|
+
*/
|
|
1268
|
+
|
|
1269
|
+
/**
|
|
1270
|
+
* A single user-defined template. Stored in `Doc.customTemplates`
|
|
1271
|
+
* (frontmatter-backed) or in the user's local library.
|
|
1272
|
+
*/
|
|
1273
|
+
interface CustomTemplateDefinition {
|
|
1274
|
+
/**
|
|
1275
|
+
* Stable id used in heading annotations (`### Foo {[name]}`). Must be
|
|
1276
|
+
* a slug — lowercase alphanumerics, hyphens. The picker enforces
|
|
1277
|
+
* uniqueness within a (doc + library) merged namespace.
|
|
1278
|
+
*/
|
|
1279
|
+
name: string;
|
|
1280
|
+
/** Human-readable label shown in the template picker. */
|
|
1281
|
+
label: string;
|
|
1282
|
+
/** Optional one-sentence description for the picker card. */
|
|
1283
|
+
description?: string;
|
|
1284
|
+
/**
|
|
1285
|
+
* Authoring viewport — the canvas size the designer drew against.
|
|
1286
|
+
* Stored so the designer and thumbnail renderer can reproduce the
|
|
1287
|
+
* same canvas. Layer positions are stored as `%`-strings, so the
|
|
1288
|
+
* actual render-time viewport can differ from this without breaking
|
|
1289
|
+
* the layout. Defaults to 1920×1080 landscape.
|
|
1290
|
+
*/
|
|
1291
|
+
viewport: {
|
|
1292
|
+
width: number;
|
|
1293
|
+
height: number;
|
|
1294
|
+
};
|
|
1295
|
+
/**
|
|
1296
|
+
* The visual content. Every `position.x` / `position.y` /
|
|
1297
|
+
* `position.width` / `position.height` should be a `%`-string at
|
|
1298
|
+
* save time (the designer's normalizePositions step enforces this).
|
|
1299
|
+
*
|
|
1300
|
+
* Tokens supported in v1:
|
|
1301
|
+
* - TextLayer.content.text — `{title}`, `{content}`, `{children}`,
|
|
1302
|
+
* `{image:N}` (substitutes the Nth image's alt text)
|
|
1303
|
+
* - ImageLayer.content.src — `{image:N}` (substitutes the URL)
|
|
1304
|
+
*/
|
|
1305
|
+
layers: Layer[];
|
|
1306
|
+
}
|
|
1307
|
+
/**
|
|
1308
|
+
* Tag value for the YAML frontmatter key that carries inlined custom
|
|
1309
|
+
* template definitions. Exported so the markdown bridge stays in sync.
|
|
1310
|
+
*/
|
|
1311
|
+
declare const FRONTMATTER_CUSTOM_TEMPLATES_KEY = "squisq-custom-templates";
|
|
1312
|
+
|
|
1313
|
+
/**
|
|
1314
|
+
* A directed connection from one block to another.
|
|
1315
|
+
*
|
|
1316
|
+
* Populated from a heading's Pandoc-style `{connectsTo=…}` attribute
|
|
1317
|
+
* (e.g. `## Step 1 {#step1 connectsTo=foo:flow,bar}`). Each item is
|
|
1318
|
+
* `target` or `target:type`. Used by diagram-style layouts that draw
|
|
1319
|
+
* edges between blocks.
|
|
1320
|
+
*/
|
|
1321
|
+
interface BlockConnection {
|
|
1322
|
+
/** Target block id (matches another block's `id`). */
|
|
1323
|
+
target: string;
|
|
1324
|
+
/** Optional connection type/label (e.g., "flow", "requires"). */
|
|
1325
|
+
type?: string;
|
|
1326
|
+
}
|
|
1041
1327
|
/**
|
|
1042
1328
|
* Configuration for the Start/resting block shown before playback begins.
|
|
1043
1329
|
*/
|
|
@@ -1057,6 +1343,29 @@ interface StartBlockConfig {
|
|
|
1057
1343
|
/** License identifier for the hero image */
|
|
1058
1344
|
heroLicense?: string;
|
|
1059
1345
|
}
|
|
1346
|
+
/**
|
|
1347
|
+
* A structural problem detected while converting or validating a document.
|
|
1348
|
+
*
|
|
1349
|
+
* Diagnostics ride on `Doc.diagnostics` so any consumer — the editor, the
|
|
1350
|
+
* CLI `validate` command, or an agent re-parsing its own output — gets the
|
|
1351
|
+
* same feedback without watching the console. Conversion never throws for
|
|
1352
|
+
* content problems; it degrades gracefully and records a diagnostic.
|
|
1353
|
+
*/
|
|
1354
|
+
interface DocDiagnostic {
|
|
1355
|
+
/** `error` = the author's intent could not be honored (e.g. unparseable
|
|
1356
|
+
* data fence); `warning` = something looks wrong but rendering proceeds
|
|
1357
|
+
* with a fallback (e.g. unknown template name). */
|
|
1358
|
+
severity: 'error' | 'warning';
|
|
1359
|
+
/** Stable machine-readable code (e.g. `unknown-template`, `duplicate-id`,
|
|
1360
|
+
* `unresolved-connection`, `data-fence-parse`, `missing-asset`). */
|
|
1361
|
+
code: string;
|
|
1362
|
+
/** Human-readable description, including a suggestion when one exists. */
|
|
1363
|
+
message: string;
|
|
1364
|
+
/** Id of the block the problem belongs to, when attributable. */
|
|
1365
|
+
blockId?: string;
|
|
1366
|
+
/** 1-based line number in the markdown source, when known. */
|
|
1367
|
+
line?: number;
|
|
1368
|
+
}
|
|
1060
1369
|
/**
|
|
1061
1370
|
* A complete visual doc for an article.
|
|
1062
1371
|
*/
|
|
@@ -1098,6 +1407,48 @@ interface Doc {
|
|
|
1098
1407
|
* Carries rendering hints like `document-render-as` and custom metadata.
|
|
1099
1408
|
*/
|
|
1100
1409
|
frontmatter?: Record<string, unknown>;
|
|
1410
|
+
/**
|
|
1411
|
+
* User-defined block templates inlined into this doc.
|
|
1412
|
+
*
|
|
1413
|
+
* Populated from the markdown frontmatter key
|
|
1414
|
+
* `squisq-custom-templates`. The template-expansion pipeline
|
|
1415
|
+
* (`expandDocBlocks`) merges these into the registry before walking
|
|
1416
|
+
* blocks, so a heading annotated `{[myhero]}` resolves against a
|
|
1417
|
+
* doc-defined template named `myhero`.
|
|
1418
|
+
*
|
|
1419
|
+
* Library templates (stored in localStorage on the editor side) are
|
|
1420
|
+
* NOT auto-loaded here — applying a library template to a block
|
|
1421
|
+
* copies its definition into this list so the doc remains
|
|
1422
|
+
* self-sufficient for SSR and export.
|
|
1423
|
+
*/
|
|
1424
|
+
customTemplates?: CustomTemplateDefinition[];
|
|
1425
|
+
/**
|
|
1426
|
+
* User-defined themes inlined into this doc.
|
|
1427
|
+
*
|
|
1428
|
+
* The theme analog of {@link Doc.customTemplates}. Populated from the
|
|
1429
|
+
* markdown frontmatter key `squisq-custom-themes`. Exactly one is active
|
|
1430
|
+
* at a time — selected by id via `squisq-theme` / {@link Doc.themeId},
|
|
1431
|
+
* the doc-level counterpart of a block's `{[name]}` template annotation —
|
|
1432
|
+
* but the payload is a list so a doc can carry a small catalog and stay
|
|
1433
|
+
* self-sufficient for SSR / export. `resolveThemeForDoc(doc, id)` resolves
|
|
1434
|
+
* against this list first (pure, doc-scoped) before built-ins, mirroring
|
|
1435
|
+
* how `buildRegistry` resolves custom templates.
|
|
1436
|
+
*/
|
|
1437
|
+
customThemes?: Theme[];
|
|
1438
|
+
/**
|
|
1439
|
+
* Structural problems found while building this doc (unknown templates,
|
|
1440
|
+
* unparseable data fences, duplicate ids, unresolved connections, …).
|
|
1441
|
+
* Populated by `markdownToDoc()`; extended by `validateMarkdownDoc()`.
|
|
1442
|
+
* Absent when the document is clean.
|
|
1443
|
+
*/
|
|
1444
|
+
diagnostics?: DocDiagnostic[];
|
|
1445
|
+
/**
|
|
1446
|
+
* Document-spanning timed media (e.g. a full-length narration MP3/MP4),
|
|
1447
|
+
* authored as a media annotation in the preamble (before the first
|
|
1448
|
+
* heading) with `anchor=document`. Each clip is timed from the document
|
|
1449
|
+
* start and may play across every block. See `resolveMediaSchedule`.
|
|
1450
|
+
*/
|
|
1451
|
+
documentMedia?: MediaClip[];
|
|
1101
1452
|
}
|
|
1102
1453
|
/**
|
|
1103
1454
|
* A single block in the doc.
|
|
@@ -1109,11 +1460,15 @@ interface Doc {
|
|
|
1109
1460
|
* - `children` holds sub-heading blocks (e.g., H2s under an H1)
|
|
1110
1461
|
*/
|
|
1111
1462
|
interface Block {
|
|
1112
|
-
/** Unique identifier for this block
|
|
1463
|
+
/** Unique identifier for this block.
|
|
1464
|
+
* Defaults to a slug derived from the heading text. May be overridden by
|
|
1465
|
+
* a Pandoc-style `{#custom-id}` attribute on the heading. */
|
|
1113
1466
|
id: string;
|
|
1114
|
-
/** When this block appears (seconds from start)
|
|
1467
|
+
/** When this block appears (seconds from start).
|
|
1468
|
+
* Overridden by a heading attribute `startTime=…` when present. */
|
|
1115
1469
|
startTime: number;
|
|
1116
|
-
/** How long this block is visible (seconds)
|
|
1470
|
+
/** How long this block is visible (seconds).
|
|
1471
|
+
* Overridden by a heading attribute `duration=…` when present. */
|
|
1117
1472
|
duration: number;
|
|
1118
1473
|
/** Which audio segment this block belongs to (0-indexed) */
|
|
1119
1474
|
audioSegment: number;
|
|
@@ -1129,6 +1484,13 @@ interface Block {
|
|
|
1129
1484
|
transition?: Transition;
|
|
1130
1485
|
/** Template name that generated this block (for debugging) */
|
|
1131
1486
|
template?: string;
|
|
1487
|
+
/**
|
|
1488
|
+
* True when `template` was chosen by content-aware auto-picking
|
|
1489
|
+
* (`markdownToDoc`'s `autoTemplates`) rather than authored. Ephemeral:
|
|
1490
|
+
* `docToMarkdown` does not materialize auto-picked templates as heading
|
|
1491
|
+
* annotations, keeping the markdown round-trip lossless.
|
|
1492
|
+
*/
|
|
1493
|
+
autoTemplate?: boolean;
|
|
1132
1494
|
/**
|
|
1133
1495
|
* Display title for template rendering.
|
|
1134
1496
|
* Extracted from the sourceHeading when the block is created by markdownToDoc().
|
|
@@ -1157,18 +1519,60 @@ interface Block {
|
|
|
1157
1519
|
*/
|
|
1158
1520
|
sourceHeading?: MarkdownHeading;
|
|
1159
1521
|
/**
|
|
1160
|
-
* Template overrides extracted from
|
|
1161
|
-
*
|
|
1162
|
-
*
|
|
1163
|
-
*
|
|
1522
|
+
* Template overrides extracted from a heading's `{[templateName key=value]}`
|
|
1523
|
+
* annotation. Only carries template-specific params (e.g. `colorScheme=blue`).
|
|
1524
|
+
* Block-level metadata lives in `x` / `y` / `connectsTo` / `metadata` and is
|
|
1525
|
+
* sourced from the Pandoc-style `{#id .class key=value}` attribute block instead.
|
|
1164
1526
|
*/
|
|
1165
1527
|
templateOverrides?: Record<string, string>;
|
|
1528
|
+
/**
|
|
1529
|
+
* Structured template inputs sourced from the block's body content:
|
|
1530
|
+
* a ```json data / ```yaml data fence under the heading, or — for the
|
|
1531
|
+
* `dataTable` template — the first GFM table in the section. Unlike
|
|
1532
|
+
* `templateOverrides` (always strings), values here keep their parsed
|
|
1533
|
+
* types (arrays, numbers, nested objects). Merge order at render time:
|
|
1534
|
+
* template defaults → `templateData` → `templateOverrides`.
|
|
1535
|
+
*/
|
|
1536
|
+
templateData?: Record<string, unknown>;
|
|
1537
|
+
/**
|
|
1538
|
+
* X coordinate for diagram-style positioning (in author-defined units).
|
|
1539
|
+
* Sourced from a heading attribute `x=…`.
|
|
1540
|
+
*/
|
|
1541
|
+
x?: number;
|
|
1542
|
+
/**
|
|
1543
|
+
* Y coordinate for diagram-style positioning (in author-defined units).
|
|
1544
|
+
* Sourced from a heading attribute `y=…`.
|
|
1545
|
+
*/
|
|
1546
|
+
y?: number;
|
|
1547
|
+
/**
|
|
1548
|
+
* Outgoing connections to other blocks, by id. Sourced from a heading
|
|
1549
|
+
* attribute `connectsTo=target1,target2:type,target3`.
|
|
1550
|
+
*/
|
|
1551
|
+
connectsTo?: BlockConnection[];
|
|
1552
|
+
/**
|
|
1553
|
+
* CSS-style class tokens from a heading's Pandoc attribute (e.g. `{.important .v2}`).
|
|
1554
|
+
* Parsed and stored; downstream consumers may use them for styling or filtering.
|
|
1555
|
+
*/
|
|
1556
|
+
classes?: string[];
|
|
1557
|
+
/**
|
|
1558
|
+
* Free-form metadata for heading attribute keys outside the typed registry
|
|
1559
|
+
* (anything that isn't `x` / `y` / `connectsTo` / `startTime` / `duration`).
|
|
1560
|
+
* Values are raw strings exactly as authored.
|
|
1561
|
+
*/
|
|
1562
|
+
metadata?: Record<string, string>;
|
|
1563
|
+
/**
|
|
1564
|
+
* Timed media clips attached to this block, authored as body-level
|
|
1565
|
+
* `{[audio …]}` / `{[video …]}` annotations. Each clip is timed relative
|
|
1566
|
+
* to this block's `startTime` (via `startAt`) and optionally spills past
|
|
1567
|
+
* the block's end. See `MediaClip` / `resolveMediaSchedule`.
|
|
1568
|
+
*/
|
|
1569
|
+
media?: MediaClip[];
|
|
1166
1570
|
}
|
|
1167
1571
|
/**
|
|
1168
1572
|
* A visual element within a block.
|
|
1169
1573
|
* Layers are composited back-to-front (first layer is background).
|
|
1170
1574
|
*/
|
|
1171
|
-
type Layer = ImageLayer | TextLayer | ShapeLayer | MapLayer | VideoLayer | TableLayer;
|
|
1575
|
+
type Layer = ImageLayer | TextLayer | ShapeLayer | PathLayer | MapLayer | VideoLayer | TableLayer;
|
|
1172
1576
|
interface BaseLayer {
|
|
1173
1577
|
/** Unique identifier for this layer */
|
|
1174
1578
|
id: string;
|
|
@@ -1177,6 +1581,24 @@ interface BaseLayer {
|
|
|
1177
1581
|
/** Animation to apply */
|
|
1178
1582
|
animation?: Animation;
|
|
1179
1583
|
}
|
|
1584
|
+
/**
|
|
1585
|
+
* Photographic treatment applied to an image layer — a theme-level "grade"
|
|
1586
|
+
* so the same photo looks native in every theme. Rendered as CSS filter
|
|
1587
|
+
* functions, which behave identically in the browser player and headless
|
|
1588
|
+
* frame capture (video/still export).
|
|
1589
|
+
*/
|
|
1590
|
+
interface ImageTreatment {
|
|
1591
|
+
/**
|
|
1592
|
+
* mono: desaturate toward archival black & white.
|
|
1593
|
+
* duotone: single-hue tint (hue taken from `color`).
|
|
1594
|
+
* warm / cool: gentle temperature grade.
|
|
1595
|
+
*/
|
|
1596
|
+
type: 'none' | 'mono' | 'duotone' | 'warm' | 'cool';
|
|
1597
|
+
/** Blend strength 0..1. Default 0.6. */
|
|
1598
|
+
strength?: number;
|
|
1599
|
+
/** Duotone tint color (themes default this to their primary). */
|
|
1600
|
+
color?: string;
|
|
1601
|
+
}
|
|
1180
1602
|
/**
|
|
1181
1603
|
* Image layer - displays an image with optional Ken Burns effect.
|
|
1182
1604
|
*/
|
|
@@ -1193,6 +1615,10 @@ interface ImageLayer extends BaseLayer {
|
|
|
1193
1615
|
credit?: string;
|
|
1194
1616
|
/** License identifier (e.g., 'CC BY-SA 4.0') */
|
|
1195
1617
|
license?: string;
|
|
1618
|
+
/** Theme-derived photographic grade (see ImageTreatment). */
|
|
1619
|
+
treatment?: ImageTreatment;
|
|
1620
|
+
/** Gaussian blur radius in px (background/atmosphere imagery). */
|
|
1621
|
+
blur?: number;
|
|
1196
1622
|
};
|
|
1197
1623
|
}
|
|
1198
1624
|
/**
|
|
@@ -1201,15 +1627,68 @@ interface ImageLayer extends BaseLayer {
|
|
|
1201
1627
|
interface TextLayer extends BaseLayer {
|
|
1202
1628
|
type: 'text';
|
|
1203
1629
|
content: {
|
|
1204
|
-
/**
|
|
1630
|
+
/**
|
|
1631
|
+
* Plain text (supports \n for line breaks). Source of truth for plain
|
|
1632
|
+
* consumers — PDF/markdown export, search, accessibility — and the SVG
|
|
1633
|
+
* `<text>` fallback. When `html` is set, this is its plain-text
|
|
1634
|
+
* projection and must be kept in sync.
|
|
1635
|
+
*/
|
|
1205
1636
|
text: string;
|
|
1637
|
+
/**
|
|
1638
|
+
* Optional sanitized **inline** HTML for rich formatting (bold/italic/
|
|
1639
|
+
* links, and — for layout textboxes — headings/lists). When present the
|
|
1640
|
+
* renderer draws it via `<foreignObject>` instead of SVG `<text>`. Treated
|
|
1641
|
+
* as untrusted and re-sanitized at render time. See `RichTextLayer` in
|
|
1642
|
+
* `@bendyline/squisq-react`.
|
|
1643
|
+
*/
|
|
1644
|
+
html?: string;
|
|
1206
1645
|
/** Text styling */
|
|
1207
1646
|
style: TextStyle;
|
|
1208
1647
|
};
|
|
1209
1648
|
}
|
|
1649
|
+
/**
|
|
1650
|
+
* A two-stop linear gradient fill, shared by shape/path fills and text
|
|
1651
|
+
* backgrounds. When present it overrides the solid `fill` color.
|
|
1652
|
+
*
|
|
1653
|
+
* `angle` is in degrees: 0 = top→bottom, 90 = left→right, increasing
|
|
1654
|
+
* clockwise. Defaults to 0. Rendered as an SVG `<linearGradient>` in
|
|
1655
|
+
* objectBoundingBox units so it scales with the layer's box.
|
|
1656
|
+
*/
|
|
1657
|
+
interface LinearGradient {
|
|
1658
|
+
from: string;
|
|
1659
|
+
to: string;
|
|
1660
|
+
angle?: number;
|
|
1661
|
+
}
|
|
1662
|
+
/** Border line style, mapped to an SVG stroke-dasharray by the renderer. */
|
|
1663
|
+
type BorderStyle = 'solid' | 'dashed' | 'dotted';
|
|
1210
1664
|
/**
|
|
1211
1665
|
* Shape layer - simple geometric shapes for visual accents.
|
|
1212
1666
|
*/
|
|
1667
|
+
/**
|
|
1668
|
+
* Repeating SVG pattern fill for a shape (dots, grid, diagonal lines).
|
|
1669
|
+
* Rendered as a native `<pattern>` def — fully vector and export-safe.
|
|
1670
|
+
*/
|
|
1671
|
+
interface ShapePattern {
|
|
1672
|
+
kind: 'dots' | 'grid' | 'diagonal';
|
|
1673
|
+
/** Pattern ink color. */
|
|
1674
|
+
color: string;
|
|
1675
|
+
/** Tile size in px (default 24). */
|
|
1676
|
+
size?: number;
|
|
1677
|
+
/** Pattern opacity 0–1 (default 1; tint via a translucent color or this). */
|
|
1678
|
+
opacity?: number;
|
|
1679
|
+
}
|
|
1680
|
+
/**
|
|
1681
|
+
* Procedural filter applied to a shape. `noise` renders static film grain
|
|
1682
|
+
* via SVG feTurbulence — deliberately not animated so frame capture and
|
|
1683
|
+
* the live player agree.
|
|
1684
|
+
*/
|
|
1685
|
+
interface ShapeFilter {
|
|
1686
|
+
type: 'noise';
|
|
1687
|
+
/** feTurbulence base frequency (default 0.8 — fine grain). */
|
|
1688
|
+
baseFrequency?: number;
|
|
1689
|
+
/** Grain opacity 0–1 (default 0.05). */
|
|
1690
|
+
opacity?: number;
|
|
1691
|
+
}
|
|
1213
1692
|
interface ShapeLayer extends BaseLayer {
|
|
1214
1693
|
type: 'shape';
|
|
1215
1694
|
content: {
|
|
@@ -1217,14 +1696,85 @@ interface ShapeLayer extends BaseLayer {
|
|
|
1217
1696
|
shape: 'rect' | 'circle' | 'line';
|
|
1218
1697
|
/** Fill color (CSS color or 'none') */
|
|
1219
1698
|
fill?: string;
|
|
1699
|
+
/** Fill opacity 0–1 (applies to solid and gradient fills). */
|
|
1700
|
+
fillOpacity?: number;
|
|
1701
|
+
/** Gradient fill; overrides `fill` when set. */
|
|
1702
|
+
gradient?: LinearGradient;
|
|
1703
|
+
/** Repeating pattern fill; overrides `fill`/`gradient` when set. */
|
|
1704
|
+
pattern?: ShapePattern;
|
|
1705
|
+
/** Procedural filter (film grain). */
|
|
1706
|
+
filter?: ShapeFilter;
|
|
1220
1707
|
/** Stroke color */
|
|
1221
1708
|
stroke?: string;
|
|
1222
1709
|
/** Stroke width in pixels */
|
|
1223
1710
|
strokeWidth?: number;
|
|
1711
|
+
/** Border line style (solid/dashed/dotted). Default solid. */
|
|
1712
|
+
borderStyle?: BorderStyle;
|
|
1224
1713
|
/** Corner radius for rect */
|
|
1225
1714
|
borderRadius?: number;
|
|
1226
1715
|
};
|
|
1227
1716
|
}
|
|
1717
|
+
/**
|
|
1718
|
+
* End-of-line marker style for a path/connector endpoint.
|
|
1719
|
+
* `arrow` is a filled triangle (the classic arrowhead); `open` is a stroked
|
|
1720
|
+
* V; `diamond`/`circle`/`square` are filled glyphs; `none` draws nothing.
|
|
1721
|
+
*/
|
|
1722
|
+
type MarkerStyle = 'none' | 'arrow' | 'open' | 'diamond' | 'circle' | 'square';
|
|
1723
|
+
/**
|
|
1724
|
+
* Path layer - renders an SVG `<path>` for arbitrary curves, connectors,
|
|
1725
|
+
* arrows, or filled regions. Used by the diagram template for edges
|
|
1726
|
+
* between nodes, the drawing template for non-rect/circle/line shapes, and
|
|
1727
|
+
* available to any template that needs a custom geometry.
|
|
1728
|
+
*
|
|
1729
|
+
* The `position` field carries the layer's bounding box (so animations
|
|
1730
|
+
* and clipping work the same as for other layers), but the actual
|
|
1731
|
+
* geometry is encoded in the `d` attribute using absolute SVG path
|
|
1732
|
+
* coordinates relative to the block viewport.
|
|
1733
|
+
*/
|
|
1734
|
+
interface PathLayer extends BaseLayer {
|
|
1735
|
+
type: 'path';
|
|
1736
|
+
content: {
|
|
1737
|
+
/** SVG path `d` attribute (e.g. "M 10 10 L 90 90"). Absolute viewBox coords. */
|
|
1738
|
+
d: string;
|
|
1739
|
+
/**
|
|
1740
|
+
* Named shape kind (e.g. `'diamond'`, `'star'`, `'arrow-right'`) for
|
|
1741
|
+
* path layers that represent one of Squisq's standard shapes. When
|
|
1742
|
+
* set, the renderer re-derives `d` from the layer's `position` box
|
|
1743
|
+
* (resolved against the viewport) instead of using the stored `d` —
|
|
1744
|
+
* so the shape moves, resizes, and adapts to any aspect ratio like
|
|
1745
|
+
* the native rect/circle/line layers do. Plain paths (connectors,
|
|
1746
|
+
* freehand) leave this unset and keep their absolute `d`.
|
|
1747
|
+
*/
|
|
1748
|
+
shapeKind?: string;
|
|
1749
|
+
/** Stroke color (default: theme text color). */
|
|
1750
|
+
stroke?: string;
|
|
1751
|
+
/** Stroke width in pixels (default: 2). */
|
|
1752
|
+
strokeWidth?: number;
|
|
1753
|
+
/** Optional fill color (default: 'none' — pure connectors). */
|
|
1754
|
+
fill?: string;
|
|
1755
|
+
/** Fill opacity 0–1 (applies to solid and gradient fills). */
|
|
1756
|
+
fillOpacity?: number;
|
|
1757
|
+
/** Gradient fill; overrides `fill` when set. */
|
|
1758
|
+
gradient?: LinearGradient;
|
|
1759
|
+
/**
|
|
1760
|
+
* Border line style (solid/dashed/dotted). A convenience over
|
|
1761
|
+
* `dasharray` for named shapes; when set the renderer derives the
|
|
1762
|
+
* dash pattern from it (scaled by stroke width).
|
|
1763
|
+
*/
|
|
1764
|
+
borderStyle?: BorderStyle;
|
|
1765
|
+
/** Optional stroke dash pattern (SVG `stroke-dasharray` syntax). */
|
|
1766
|
+
dasharray?: string;
|
|
1767
|
+
/**
|
|
1768
|
+
* Legacy arrowhead flag. Prefer `startMarker`/`endMarker`. When those are
|
|
1769
|
+
* unset, `'end'`/`'start'`/`'both'` render a filled-triangle arrowhead.
|
|
1770
|
+
*/
|
|
1771
|
+
arrow?: 'none' | 'end' | 'start' | 'both';
|
|
1772
|
+
/** Marker at the path start (overrides `arrow`). Default: derived from `arrow`. */
|
|
1773
|
+
startMarker?: MarkerStyle;
|
|
1774
|
+
/** Marker at the path end (overrides `arrow`). Default: derived from `arrow`. */
|
|
1775
|
+
endMarker?: MarkerStyle;
|
|
1776
|
+
};
|
|
1777
|
+
}
|
|
1228
1778
|
/**
|
|
1229
1779
|
* Map layer - displays a geographic map with optional markers.
|
|
1230
1780
|
*
|
|
@@ -1276,6 +1826,16 @@ interface VideoLayer extends BaseLayer {
|
|
|
1276
1826
|
clipEnd: number;
|
|
1277
1827
|
/** Total source video duration (for validation) */
|
|
1278
1828
|
sourceDuration?: number;
|
|
1829
|
+
/**
|
|
1830
|
+
* Seconds into the owning block before this video begins playing
|
|
1831
|
+
* (the block-relative `startAt`). Default 0 — plays from block start.
|
|
1832
|
+
*/
|
|
1833
|
+
startAt?: number;
|
|
1834
|
+
/**
|
|
1835
|
+
* When true, the video keeps playing past the block's end (the
|
|
1836
|
+
* playback scheduler re-homes it to the player level). Default false.
|
|
1837
|
+
*/
|
|
1838
|
+
spillover?: boolean;
|
|
1279
1839
|
/** Video credit / artist name */
|
|
1280
1840
|
credit?: string;
|
|
1281
1841
|
/** License identifier (e.g., 'CC BY-SA 4.0') */
|
|
@@ -1367,16 +1927,34 @@ interface TextStyle {
|
|
|
1367
1927
|
fontFamily?: string;
|
|
1368
1928
|
/** Font weight */
|
|
1369
1929
|
fontWeight?: 'normal' | 'bold';
|
|
1930
|
+
/** Font style. Also the inherited baseline for rich `content.html`. */
|
|
1931
|
+
fontStyle?: 'normal' | 'italic';
|
|
1370
1932
|
/** Text color (CSS color) */
|
|
1371
1933
|
color: string;
|
|
1372
|
-
/**
|
|
1934
|
+
/** Horizontal text alignment within the layer's position box. */
|
|
1373
1935
|
textAlign?: 'left' | 'center' | 'right';
|
|
1936
|
+
/**
|
|
1937
|
+
* Vertical alignment of the text within the layer's position box.
|
|
1938
|
+
* Requires a `position.height` to have an effect. When omitted, the
|
|
1939
|
+
* vertical baseline is derived from `position.anchor` (legacy behavior).
|
|
1940
|
+
*/
|
|
1941
|
+
verticalAlign?: 'top' | 'middle' | 'bottom';
|
|
1374
1942
|
/** Line height multiplier */
|
|
1375
1943
|
lineHeight?: number;
|
|
1376
1944
|
/** Add drop shadow for readability over images */
|
|
1377
1945
|
shadow?: boolean;
|
|
1378
1946
|
/** Background color for text box */
|
|
1379
1947
|
background?: string;
|
|
1948
|
+
/** Background opacity 0–1 (applies to solid and gradient backgrounds). */
|
|
1949
|
+
backgroundOpacity?: number;
|
|
1950
|
+
/** Gradient background; overrides `background` when set. */
|
|
1951
|
+
backgroundGradient?: LinearGradient;
|
|
1952
|
+
/** Border (stroke) color for the text box. */
|
|
1953
|
+
borderColor?: string;
|
|
1954
|
+
/** Border width in pixels. A border renders when > 0 and a color is set. */
|
|
1955
|
+
borderWidth?: number;
|
|
1956
|
+
/** Border line style (solid/dashed/dotted). Default solid. */
|
|
1957
|
+
borderStyle?: BorderStyle;
|
|
1380
1958
|
/** Padding around text (pixels) */
|
|
1381
1959
|
padding?: number;
|
|
1382
1960
|
/** Maximum number of lines before truncation (adds "..." to last line) */
|
|
@@ -1403,16 +1981,6 @@ interface Animation {
|
|
|
1403
1981
|
* Available animation types.
|
|
1404
1982
|
*/
|
|
1405
1983
|
type AnimationType = 'none' | 'fadeIn' | 'fadeOut' | 'slowZoom' | 'zoomIn' | 'zoomOut' | 'panLeft' | 'panRight' | 'typewriter';
|
|
1406
|
-
/**
|
|
1407
|
-
* Transition between blocks.
|
|
1408
|
-
*/
|
|
1409
|
-
interface Transition {
|
|
1410
|
-
/** Transition type */
|
|
1411
|
-
type: TransitionType;
|
|
1412
|
-
/** Duration in seconds */
|
|
1413
|
-
duration: number;
|
|
1414
|
-
}
|
|
1415
|
-
type TransitionType = 'cut' | 'fade' | 'dissolve' | 'slideLeft' | 'slideRight';
|
|
1416
1984
|
/**
|
|
1417
1985
|
* Audio track configuration.
|
|
1418
1986
|
* Articles have multiple MP3 segments (intro + sections).
|
|
@@ -1459,8 +2027,10 @@ interface CaptionPhrase {
|
|
|
1459
2027
|
interface CaptionTrack {
|
|
1460
2028
|
/** Caption phrases in chronological order */
|
|
1461
2029
|
phrases: CaptionPhrase[];
|
|
1462
|
-
/** When the captions were generated
|
|
1463
|
-
|
|
2030
|
+
/** When the captions were generated. Optional so that conversion stays
|
|
2031
|
+
* deterministic — `markdownToDoc()` only sets it when the caller
|
|
2032
|
+
* supplies a timestamp via `captionsGeneratedAt`. */
|
|
2033
|
+
generatedAt?: string;
|
|
1464
2034
|
/** Algorithm version for regeneration detection */
|
|
1465
2035
|
version: number;
|
|
1466
2036
|
}
|
|
@@ -1525,4 +2095,4 @@ declare function getCaptionAtTime(captions: CaptionTrack | undefined, time: numb
|
|
|
1525
2095
|
*/
|
|
1526
2096
|
declare function validateDoc(script: Doc): string[];
|
|
1527
2097
|
|
|
1528
|
-
export { type
|
|
2098
|
+
export { type MediaClip as $, type AccentImage as A, type Block as B, type CaptionPhrase as C, DARK_SURFACE as D, type DrawingBlockInput as E, FRONTMATTER_CUSTOM_TEMPLATES_KEY as F, FRONTMATTER_CUSTOM_THEMES_KEY as G, type FactCardInput as H, type FontFamily as I, type FontFamilyKind as J, type FullBleedQuoteInput as K, type GradientBackgroundConfig as L, type ImageBackgroundConfig as M, type ImageLayer as N, type ImageTreatment as O, type ImageWithCaptionInput as P, LIGHT_SURFACE as Q, type Layer as R, type LayoutHints as S, type LeftFeatureInput as T, type LinearGradient as U, type ListBlockInput as V, type MapBlockInput as W, type MapLayer as X, type MapMarker as Y, type MapTileStyle as Z, type MarkerStyle as _, type AccentPosition as a, getSegmentAtTime as a$, type PathLayer as a0, type PatternBackgroundConfig as a1, type PersistentLayer as a2, type PersistentLayerConfig as a3, type PersistentLayerTemplate as a4, type PersistentLayerTemplateConfig as a5, type PersistentLayerTemplateType as a6, type PhotoGridInput as a7, type Position as a8, type ProgressIndicatorConfig as a9, type ThemeSchemaVersion as aA, type ThemeSeedColors as aB, type ThemeStyle as aC, type ThemeTypography as aD, type TitleBlockInput as aE, type TitleCaptionConfig as aF, type TwoColumnInput as aG, VIEWPORT_PRESETS as aH, type VideoLayer as aI, type VideoPullQuoteInput as aJ, type VideoWithCaptionInput as aK, type ViewportConfig as aL, type ViewportOrientation as aM, type ViewportPreset as aN, type VignetteConfig as aO, applySurface as aP, calculateDuration as aQ, calculateFontScale as aR, createTemplateContext as aS, createTheme as aT, getAspectRatioString as aU, getBlockAtTime as aV, getCaptionAtTime as aW, getDocPlaybackDuration as aX, getLayoutHints as aY, getRegisteredThemes as aZ, getSafeTextBounds as a_, type PullQuoteInput as aa, type QuoteBlockInput as ab, type RawLayersInput as ac, type RenderStyle as ad, type RightFeatureInput as ae, type ScheduledClip as af, type SectionHeaderInput as ag, type ShapeFilter as ah, type ShapeLayer as ai, type ShapePattern as aj, type SolidBackgroundConfig as ak, type StartBlockConfig as al, type StatHighlightInput as am, type SurfaceScheme as an, THEME_SCHEMA_VERSION as ao, type TableLayer as ap, type TableLayerStyle as aq, type TemplateBlock as ar, type TemplateContext as as, type TemplateFunction as at, type TemplateRegistry as au, type TextLayer as av, type TextStyle as aw, type Theme as ax, type ThemeColorPalette as ay, type ThemeColorScheme as az, type AmbientGradientConfig as b, getTwoColumnPositions as b0, getViewport as b1, getViewportOrientation as b2, isPersistentLayerTemplate as b3, isTemplateBlock as b4, scaledFontSize$1 as b5, lookupRegisteredTheme as b6, registerTheme as b7, resolveMediaSchedule as b8, scaledFontSize as b9, unregisterTheme as ba, validateDoc as bb, type Animation as c, type AnimationType as d, type AudioBookmark as e, type AudioSegment as f, type AudioTimingData as g, type AudioTrack as h, type BlockConnection as i, type BorderStyle as j, type CaptionTrack as k, type CaptionWord as l, type ColorScheme as m, type ComparisonBarInput as n, type CornerBrandingConfig as o, type CustomTemplateDefinition as p, DEFAULT_DOC_FONT as q, DEFAULT_TITLE_FONT as r, type DataTableInput as s, type DateEventInput as t, type DeepPartial as u, type DefinitionCardInput as v, type DiagramBlockInput as w, type Doc as x, type DocBlock as y, type DocDiagnostic as z };
|